Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,10 +4,12 @@ from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
4 |
import torch
|
5 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
6 |
|
|
|
|
|
|
|
7 |
model = AutoModelForSequenceClassification.from_pretrained("SrivarshiniGanesan/finetuned-stress-model")
|
8 |
tokenizer = AutoTokenizer.from_pretrained("SrivarshiniGanesan/finetuned-stress-model")
|
9 |
|
10 |
-
app = FastAPI(title="Stress Detection API", version="1.0")
|
11 |
|
12 |
# Request format
|
13 |
class TextInput(BaseModel):
|
|
|
4 |
import torch
|
5 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
6 |
|
7 |
+
# Initialize FastAPI app
|
8 |
+
app = FastAPI(title="Stress Detection API", version="1.0")
|
9 |
+
|
10 |
model = AutoModelForSequenceClassification.from_pretrained("SrivarshiniGanesan/finetuned-stress-model")
|
11 |
tokenizer = AutoTokenizer.from_pretrained("SrivarshiniGanesan/finetuned-stress-model")
|
12 |
|
|
|
13 |
|
14 |
# Request format
|
15 |
class TextInput(BaseModel):
|