jackkuo commited on
Commit
6187478
·
verified ·
1 Parent(s): 07848f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -126,6 +126,11 @@ Please pay attention to the pipe format as shown in the example below. This form
126
  Structure your responses to allow for seamless concatenation, presenting all tabular data from a scientific article as a single table, even if the original content had multiple tables. Use the full response capacity to maximize data presentation, avoiding summarizations, commentaries, or introductions at the end of each response. The subsequent response should pick up precisely where the preceding one concluded, commencing from the following character, without the necessity to reiterate the table header or the fragmented words. This method ensures the table is presented completely and seamlessly, despite character limit constraints. Please start by outputting the first segment of the table according to these guidelines.
127
  """
128
 
 
 
 
 
 
129
  with gr.Blocks(title="Automated Enzyme Kinetics Extractor") as demo:
130
  gr.Markdown(
131
  '''<h1 align="center"> Automated Enzyme Kinetics Extractor </h1>
@@ -145,6 +150,7 @@ with gr.Blocks(title="Automated Enzyme Kinetics Extractor") as demo:
145
 
146
  with gr.Column(scale=2):
147
  model_input = gr.Textbox(lines=7, value=en_1, placeholder='Enter your extraction prompt here', label='Input Prompt')
 
148
  with gr.Row():
149
  gen = gr.Button("Generate")
150
  clr = gr.Button("Clear")
@@ -155,7 +161,7 @@ with gr.Blocks(title="Automated Enzyme Kinetics Extractor") as demo:
155
  | Enzyme3 | Homo sapiens | Substrate_C | 6.9 | mM | 15.6 | s^-1 | 43000 | µM^-1s^-1 | 65°C | 8.0 | T253S | NAD^+ |
156
 
157
  """)
158
-
159
  gen.click(fn=predict, inputs=[model_input, file_input], outputs=outputs)
160
  clr.click(fn=lambda: [gr.update(value=""), gr.update(value="")], inputs=None, outputs=[model_input, outputs])
161
  viewer_button.click(display_pdf_images, inputs=file_input, outputs=file_out)
 
126
  Structure your responses to allow for seamless concatenation, presenting all tabular data from a scientific article as a single table, even if the original content had multiple tables. Use the full response capacity to maximize data presentation, avoiding summarizations, commentaries, or introductions at the end of each response. The subsequent response should pick up precisely where the preceding one concluded, commencing from the following character, without the necessity to reiterate the table header or the fragmented words. This method ensures the table is presented completely and seamlessly, despite character limit constraints. Please start by outputting the first segment of the table according to these guidelines.
127
  """
128
 
129
+
130
+ def update_input():
131
+ return en_1
132
+
133
+
134
  with gr.Blocks(title="Automated Enzyme Kinetics Extractor") as demo:
135
  gr.Markdown(
136
  '''<h1 align="center"> Automated Enzyme Kinetics Extractor </h1>
 
150
 
151
  with gr.Column(scale=2):
152
  model_input = gr.Textbox(lines=7, value=en_1, placeholder='Enter your extraction prompt here', label='Input Prompt')
153
+ exp = gr.Button("Example Prompt")
154
  with gr.Row():
155
  gen = gr.Button("Generate")
156
  clr = gr.Button("Clear")
 
161
  | Enzyme3 | Homo sapiens | Substrate_C | 6.9 | mM | 15.6 | s^-1 | 43000 | µM^-1s^-1 | 65°C | 8.0 | T253S | NAD^+ |
162
 
163
  """)
164
+ exp.click(update_input, outputs=model_input)
165
  gen.click(fn=predict, inputs=[model_input, file_input], outputs=outputs)
166
  clr.click(fn=lambda: [gr.update(value=""), gr.update(value="")], inputs=None, outputs=[model_input, outputs])
167
  viewer_button.click(display_pdf_images, inputs=file_input, outputs=file_out)