Spaces:
Runtime error
Runtime error
Commit ·
bb85ea5
1
Parent(s): 1bc0703
newone
Browse files- app.py +6 -6
- requirements.txt +10 -10
app.py
CHANGED
|
@@ -67,12 +67,12 @@ with open(writable_path, 'rb') as f:
|
|
| 67 |
print("Label encoder loaded successfully")
|
| 68 |
|
| 69 |
# Load the models and tokenizers
|
| 70 |
-
sentiment_model = AutoModel.from_pretrained('
|
| 71 |
-
sentiment_tokenizer = AutoTokenizer.from_pretrained('
|
| 72 |
-
issue_model = AutoModel.from_pretrained('
|
| 73 |
-
issue_tokenizer = AutoTokenizer.from_pretrained('
|
| 74 |
-
subcategory_model = AutoModel.from_pretrained('
|
| 75 |
-
subcategory_tokenizer = AutoTokenizer.from_pretrained('
|
| 76 |
|
| 77 |
|
| 78 |
|
|
|
|
| 67 |
print("Label encoder loaded successfully")
|
| 68 |
|
| 69 |
# Load the models and tokenizers
|
| 70 |
+
sentiment_model = AutoModel.from_pretrained('sentiment-model').to(device)
|
| 71 |
+
sentiment_tokenizer = AutoTokenizer.from_pretrained('sentiment-model')
|
| 72 |
+
issue_model = AutoModel.from_pretrained('issue-model').to(device)
|
| 73 |
+
issue_tokenizer = AutoTokenizer.from_pretrained('issue-model')
|
| 74 |
+
subcategory_model = AutoModel.from_pretrained('subcategory-model').to(device)
|
| 75 |
+
subcategory_tokenizer = AutoTokenizer.from_pretrained('subcategory-model')
|
| 76 |
|
| 77 |
|
| 78 |
|
requirements.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
-
pandas
|
| 2 |
-
pickle-mixin
|
| 3 |
-
flask
|
| 4 |
-
flask-cors
|
| 5 |
-
pyngrok
|
| 6 |
-
scikit-learn
|
| 7 |
-
torch
|
| 8 |
-
transformers
|
| 9 |
-
surprise
|
| 10 |
-
gunicorn
|
|
|
|
| 1 |
+
pandas==1.5.3
|
| 2 |
+
pickle-mixin==1.0.2
|
| 3 |
+
flask==2.2.3
|
| 4 |
+
flask-cors==3.1.1
|
| 5 |
+
pyngrok==5.2.0
|
| 6 |
+
scikit-learn==1.2.2
|
| 7 |
+
torch==2.1.0
|
| 8 |
+
transformers==4.33.0
|
| 9 |
+
surprise==0.2
|
| 10 |
+
gunicorn==20.1.0
|