Update app.py
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ class TextIn(BaseModel):
|
|
77 |
text: str
|
78 |
|
79 |
|
80 |
-
@app.post("/predict")
|
81 |
def predict(data: TextIn):
|
82 |
text = data.text
|
83 |
try:
|
@@ -107,3 +107,6 @@ def predict(data: TextIn):
|
|
107 |
def root():
|
108 |
return {"message": "API is running"}
|
109 |
|
|
|
|
|
|
|
|
77 |
text: str
|
78 |
|
79 |
|
80 |
+
@app.post("/api/predict")
|
81 |
def predict(data: TextIn):
|
82 |
text = data.text
|
83 |
try:
|
|
|
107 |
def root():
|
108 |
return {"message": "API is running"}
|
109 |
|
110 |
+
@app.post("/predict")
|
111 |
+
def predict(input: InputText):
|
112 |
+
return {"msg": "Received", "text": input.text}
|