Spaces:
Runtime error
Runtime error
Ryan Kim
commited on
Commit
•
ca4ab65
1
Parent(s):
73f7e39
adding basic code for hugging face
Browse files- README.md +11 -0
- requirements.txt +0 -0
- src/main.py +10 -0
README.md
CHANGED
@@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# cs-gy-6613-project-rk2546
|
2 |
|
3 |
## Milestone 1
|
|
|
1 |
+
---
|
2 |
+
title: Csgy6613 Project Rk2546
|
3 |
+
emoji: 🌍
|
4 |
+
colorFrom: pink
|
5 |
+
colorTo: yellow
|
6 |
+
sdk: streamlit
|
7 |
+
sdk_version: 1.17.0
|
8 |
+
app_file: src/main.py
|
9 |
+
pinned: false
|
10 |
+
---
|
11 |
+
|
12 |
# cs-gy-6613-project-rk2546
|
13 |
|
14 |
## Milestone 1
|
requirements.txt
CHANGED
Binary files a/requirements.txt and b/requirements.txt differ
|
|
src/main.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
|
3 |
+
classifier = pipeline(task="sentiment-analysis")
|
4 |
+
|
5 |
+
user_input = input("Please enter a text to perform sentiment analysis upon:\n")
|
6 |
+
|
7 |
+
classification = classifier(user_input)
|
8 |
+
|
9 |
+
print("Sentimeny Analysis:")
|
10 |
+
print(classification)
|