Sergiu2404 commited on
Commit
b8e2fdf
·
1 Parent(s): ed6c508

refactor app.py and requirements.txt to specify gradio version

Browse files
Files changed (1) hide show
  1. app.py +16 -15
app.py CHANGED
@@ -35,22 +35,23 @@ def predict_sentiment(text):
35
  interpretation = "neutral"
36
  return round(score, 4), interpretation
37
 
38
- iface = gr.Interface(fn=predict_sentiment,
39
- inputs=gr.Textbox(label="Enter financial sentence"),
40
- outputs=[
41
- gr.Number(label="Sentiment Score"),
42
- gr.Textbox(label="Interpretation")
43
- ],
44
- title="TinyFinBERT Sentiment Analysis",
45
- # allow_api=True
46
- api_name="predict"
47
- )
 
48
 
49
  #iface.launch()
50
  iface.launch(
51
- server_name="0.0.0.0",
52
- share=True,
53
- #enable_queue=False
54
- max_threads=40,
55
- show_api=True
56
  )
 
35
  interpretation = "neutral"
36
  return round(score, 4), interpretation
37
 
38
+ iface = gr.Interface(
39
+ fn=predict_sentiment,
40
+ inputs=gr.Textbox(label="Enter financial sentence"),
41
+ outputs=[
42
+ gr.Number(label="Sentiment Score"),
43
+ gr.Textbox(label="Interpretation")
44
+ ],
45
+ title="TinyFinBERT Sentiment Analysis",
46
+ allow_api=True,
47
+ api_name="predict"
48
+ )
49
 
50
  #iface.launch()
51
  iface.launch(
52
+ # server_name="0.0.0.0",
53
+ # share=True,
54
+ # #enable_queue=False
55
+ # max_threads=40,
56
+ # show_api=True
57
  )