Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ def send_results_to_api(data, result_url):
|
|
| 18 |
else:
|
| 19 |
return {'error':f"failed to send result to API: {response.status_code}"}
|
| 20 |
|
| 21 |
-
def
|
| 22 |
params = json.loads(params)
|
| 23 |
|
| 24 |
texts = params.get("texts",[])
|
|
@@ -58,5 +58,5 @@ def process_audio(params):
|
|
| 58 |
inputt = gr.Textbox(label="Parameters in Json Format...")
|
| 59 |
outputt = gr.JSON()
|
| 60 |
|
| 61 |
-
application = gr.Interface(fn =
|
| 62 |
application.launch()
|
|
|
|
| 18 |
else:
|
| 19 |
return {'error':f"failed to send result to API: {response.status_code}"}
|
| 20 |
|
| 21 |
+
def predict_text(params):
|
| 22 |
params = json.loads(params)
|
| 23 |
|
| 24 |
texts = params.get("texts",[])
|
|
|
|
| 58 |
inputt = gr.Textbox(label="Parameters in Json Format...")
|
| 59 |
outputt = gr.JSON()
|
| 60 |
|
| 61 |
+
application = gr.Interface(fn = predict_text, inputs = inputt, outputs = outputt, title='Multi Text Classification with API Integration..')
|
| 62 |
application.launch()
|