Update main.py
Browse files
main.py
CHANGED
|
@@ -28,9 +28,10 @@ app.add_middleware(
|
|
| 28 |
gr.mount_gradio_app(app, demo, path="/gradio")
|
| 29 |
|
| 30 |
@app.post("/run")
|
| 31 |
-
async def api_run(
|
| 32 |
try:
|
| 33 |
-
|
|
|
|
| 34 |
|
| 35 |
return {"result": output}
|
| 36 |
except Exception as e:
|
|
|
|
| 28 |
gr.mount_gradio_app(app, demo, path="/gradio")
|
| 29 |
|
| 30 |
@app.post("/run")
|
| 31 |
+
async def api_run(args: dict):
|
| 32 |
try:
|
| 33 |
+
print(args['text'])
|
| 34 |
+
output = fn.fn_pke(args['text'])
|
| 35 |
|
| 36 |
return {"result": output}
|
| 37 |
except Exception as e:
|