Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,11 +44,11 @@ class Inference:
|
|
| 44 |
|
| 45 |
inference = Inference(model, vectorizer)
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
| 49 |
#return {"message": "Welcome to Sentiment Analysis API"}
|
| 50 |
|
| 51 |
-
@app.get("/{review}")
|
| 52 |
def predict_sentiment(review: str):
|
| 53 |
return {"sentiment": inference.get_sentiment(review)}
|
| 54 |
|
|
|
|
| 44 |
|
| 45 |
inference = Inference(model, vectorizer)
|
| 46 |
|
| 47 |
+
@app.get("/")
|
| 48 |
+
def home():
|
| 49 |
#return {"message": "Welcome to Sentiment Analysis API"}
|
| 50 |
|
| 51 |
+
@app.get("/predict/{review}")
|
| 52 |
def predict_sentiment(review: str):
|
| 53 |
return {"sentiment": inference.get_sentiment(review)}
|
| 54 |
|