janasumit2911 commited on
Commit
ca7dff7
·
verified ·
1 Parent(s): 922b2f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 process_audio(params):
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 = process_audio(), inputs = inputt, outputs = outputt, title='Multi Text Classification with API Integration..')
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()