SrivarshiniGanesan commited on
Commit
5fc85b6
·
verified ·
1 Parent(s): 204858a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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):