koyu008 commited on
Commit
79819d8
·
verified ·
1 Parent(s): 3a3863a

Update app.py

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