katielink commited on
Commit
f9db121
1 Parent(s): 281af70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -4,9 +4,7 @@ demo = gr.Blocks()
4
 
5
  name_list = ['huggingface/microsoft/biogpt', 'huggingface/stanford-crfm/BioMedLM']
6
 
7
- examples = [
8
- ['COVID is'],
9
- ]
10
 
11
  def generate_biomedical(text):
12
  interfaces = [gr.Interface.load(name) for name in name_list]
@@ -22,7 +20,7 @@ with gr.Blocks() as demo:
22
  with gr.Column():
23
  input_text = gr.Textbox(label = "Write your text here", lines=4)
24
  with gr.Row():
25
- btn = gr.Button("Generate")
26
 
27
  example_text = gr.Dataset(components=[input_text], samples=examples)
28
  example_text.click(fn=set_example,
@@ -30,4 +28,4 @@ with gr.Blocks() as demo:
30
  outputs= example_text.components)
31
  with gr.Column():
32
  gr.Markdown("Let’s compare!")
33
- btn.click(generate_biomedical, inputs = input_text, outputs = [gr.Textbox(label=name_list[_], lines=4) for _ in range(len(name_list))])
 
4
 
5
  name_list = ['huggingface/microsoft/biogpt', 'huggingface/stanford-crfm/BioMedLM']
6
 
7
+ examples = [['COVID-19 is'],['A 65-year-old female patient with a past medical history of']]
 
 
8
 
9
  def generate_biomedical(text):
10
  interfaces = [gr.Interface.load(name) for name in name_list]
 
20
  with gr.Column():
21
  input_text = gr.Textbox(label = "Write your text here", lines=4)
22
  with gr.Row():
23
+ btn = gr.Button("Generate")
24
 
25
  example_text = gr.Dataset(components=[input_text], samples=examples)
26
  example_text.click(fn=set_example,
 
28
  outputs= example_text.components)
29
  with gr.Column():
30
  gr.Markdown("Let’s compare!")
31
+ btn.click(generate_biomedical, inputs = input_text, outputs = [gr.Textbox(label=name_list[_], lines=4) for _ in range(len(name_list))])