safwansajad commited on
Commit
3b2d8a9
·
verified ·
1 Parent(s): 99641c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -58,12 +58,5 @@ def api_predict(message, session_id="default"):
58
  response, emotion, score = chatbot_response(message, session_id)
59
  return {"response": response, "emotion": emotion, "score": score}
60
 
61
- predict_api = gr.Interface(
62
- fn=api_predict,
63
- inputs=[gr.Textbox(label="Message"), gr.Textbox(label="Session ID")],
64
- outputs=[gr.Textbox(label="Response"), gr.Textbox(label="Emotion"), gr.Number(label="Score")]
65
- )
66
-
67
  # ------------------ Launch for Gradio Spaces ------------------
68
- demo.launch(share=True)
69
- predict_api.launch(inline=False)
 
58
  response, emotion, score = chatbot_response(message, session_id)
59
  return {"response": response, "emotion": emotion, "score": score}
60
 
 
 
 
 
 
 
61
  # ------------------ Launch for Gradio Spaces ------------------
62
+ demo.launch(share=True) # This generates the public URL