vikaskookna commited on
Commit
ead8f37
·
1 Parent(s): ac5cff1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -4
app.py CHANGED
@@ -17,12 +17,24 @@ def funct(sentence):
17
 
18
 
19
  with gr.Blocks() as app:
20
- sentence = gr.Textbox(label='input')
21
- sentiment = gr.Textbox(label='chatbot')
22
  submit = gr.Button(value="Send", variant="secondary").style(full_width=False)
23
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  submit.click(fn=funct,
25
- inputs=sentence,
26
- outputs=sentiment)
27
 
28
  app.launch(debug=True)
 
17
 
18
 
19
  with gr.Blocks() as app:
20
+ message = gr.Textbox(label='input')
21
+ sentiment = gr.Chatbot()
22
  submit = gr.Button(value="Send", variant="secondary").style(full_width=False)
23
 
24
+ gr.Examples(
25
+ examples=["How many people live in Canada?",
26
+ "What is 2 to the 30th power?",
27
+ "If x+y=10 and x-y=4, what are x and y?",
28
+ "How much did it rain in SF today?",
29
+ "Get me information about the movie 'Avatar'",
30
+ "What are the top tech headlines in the US?",
31
+ "On the desk, you see two blue booklets, two purple booklets, and two yellow pairs of sunglasses - "
32
+ "if I remove all the pairs of sunglasses from the desk, how many purple items remain on it?"],
33
+ inputs=message
34
+ )
35
+
36
  submit.click(fn=funct,
37
+ inputs=message,
38
+ outputs=[sentiment])
39
 
40
  app.launch(debug=True)