w601sxs commited on
Commit
3654912
·
1 Parent(s): 6cc1787

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -141,8 +141,9 @@ def predict(text):
141
 
142
  demo = gr.Interface(
143
  fn=render_output,
144
- inputs=['text','text'],
145
  outputs='html',
146
  examples=[['context: <As an AI assistant provide helpful, accurate and detailed answers to user questions> question: <Given the fact that Inhaling, or breathing in, increases the size of the chest, which decreases air pressure inside the lungs. If Mona is done with a race and her chest contracts, what happens to the amount of air pressure in her lungs increases or decreases?>\nanswer: <'],['context: <As an AI assistant provide helpful, accurate and detailed answers to user questions>\n question: <In this task, you\'re given the title of a five-sentence story, the first four sentences, and two options for the fifth sentence as a and b. Your job is to pick the sentence option that seamlessly connects with the rest of the story, indicating your choice as "a" or "b". If both sentences are plausible, pick the one that makes more sense. Title: Missing Radio. Sentence 1: Josh was very sad to find out he could not find his radio. Sentence 2: He searched all day and night. Sentence 3: He even went back to school to find his radio. Sentence 4: Later on, someone turned in his radio to the lost and found. Choices: a. Once he got his new car, Stuart was very happy and relieved. b. Now, James was able to listen to the game on his radio.>\nanswer: <']])
147
 
 
148
  demo.launch()
 
141
 
142
  demo = gr.Interface(
143
  fn=render_output,
144
+ inputs=[gr.Textbox(label='context',value='As an AI assistant provide helpful, accurate and detailed answers to user questions'),gr.Textbox(label='question')],
145
  outputs='html',
146
  examples=[['context: <As an AI assistant provide helpful, accurate and detailed answers to user questions> question: <Given the fact that Inhaling, or breathing in, increases the size of the chest, which decreases air pressure inside the lungs. If Mona is done with a race and her chest contracts, what happens to the amount of air pressure in her lungs increases or decreases?>\nanswer: <'],['context: <As an AI assistant provide helpful, accurate and detailed answers to user questions>\n question: <In this task, you\'re given the title of a five-sentence story, the first four sentences, and two options for the fifth sentence as a and b. Your job is to pick the sentence option that seamlessly connects with the rest of the story, indicating your choice as "a" or "b". If both sentences are plausible, pick the one that makes more sense. Title: Missing Radio. Sentence 1: Josh was very sad to find out he could not find his radio. Sentence 2: He searched all day and night. Sentence 3: He even went back to school to find his radio. Sentence 4: Later on, someone turned in his radio to the lost and found. Choices: a. Once he got his new car, Stuart was very happy and relieved. b. Now, James was able to listen to the game on his radio.>\nanswer: <']])
147
 
148
+
149
  demo.launch()