davoodwadi commited on
Commit
f0059b4
·
verified ·
1 Parent(s): 74c0e4e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import numpy as np
3
+
4
+ def get_sentiment(Review, satisfied):
5
+ # Get sentiment from LLM
6
+ if satisfied:
7
+ Sentiment = 'Positive'
8
+ else:
9
+ Sentiment = np.random.choice(['Positive', 'Negative'])
10
+ return Sentiment
11
+
12
+ demo = gr.Interface(fn=get_sentiment, inputs=["textbox", 'checkbox'], outputs="textbox")
13
+
14
+ if __name__ == "__main__":
15
+ demo.launch()