shahryarsaeed23 commited on
Commit
61fe723
·
1 Parent(s): 665471e
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -20,8 +20,10 @@ def respond(message):
20
  demo = gr.Interface(
21
  fn=respond,
22
  inputs=gr.Textbox(label="Input Text"),
23
- outputs=gr.Textbox(label="Sentiment Analysis Result")
 
 
24
  )
25
 
26
  if __name__ == "__main__":
27
- demo.launch() # Removed enable_api=True
 
20
  demo = gr.Interface(
21
  fn=respond,
22
  inputs=gr.Textbox(label="Input Text"),
23
+ outputs=gr.Textbox(label="Sentiment Analysis Result"),
24
+ allow_flagging="never", # Disable flagging (optional, but good for API usage)
25
+ api=True # Enable API
26
  )
27
 
28
  if __name__ == "__main__":
29
+ demo.launch()