Spaces:
Runtime error
Runtime error
Commit
·
3800e81
1
Parent(s):
859aa20
Update app.py
Browse files
app.py
CHANGED
@@ -140,25 +140,25 @@ with gr.Blocks() as demo:
|
|
140 |
|
141 |
# login_button.click(check_password, inputs=[username_input, password_input], outputs=[login_result])
|
142 |
|
|
|
143 |
with gr.Row():
|
144 |
-
model_input = gr.Textbox(label="Enter the model to use", value="h2oai/h2ogpt-4096-llama2-7b-chat")
|
145 |
-
query_input = gr.Textbox(label="Query Keywords")
|
146 |
retmax_input = gr.Slider(minimum=1, maximum=20, value=5, step=1, label="Number of articles")
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
|
156 |
def process_login(is_success, message):
|
157 |
if is_success:
|
158 |
model_input.visible = True
|
159 |
query_input.visible = True
|
160 |
summarize_button.visible = True
|
161 |
-
login_result.
|
162 |
login_result.visible = True
|
163 |
|
164 |
login_button.click(check_password, inputs=[password_input], outputs=[login_result]).then(
|
|
|
140 |
|
141 |
# login_button.click(check_password, inputs=[username_input, password_input], outputs=[login_result])
|
142 |
|
143 |
+
query_input = gr.Textbox(label="Query Keywords")
|
144 |
with gr.Row():
|
|
|
|
|
145 |
retmax_input = gr.Slider(minimum=1, maximum=20, value=5, step=1, label="Number of articles")
|
146 |
+
model_input = gr.Textbox(label="Enter the model to use", value="h2oai/h2ogpt-4096-llama2-7b-chat")
|
147 |
+
search_button = gr.Button("Search")
|
148 |
+
output_table = gr.Dataframe(headers=["PMID", "Authors", "Title","Abstract" ])
|
149 |
+
summarize_button = gr.Button("Summarize")
|
150 |
+
summary_output = gr.Textbox()
|
151 |
|
152 |
+
model_input.visible = False
|
153 |
+
query_input.visible = False
|
154 |
+
summarize_button.visible = False
|
155 |
|
156 |
def process_login(is_success, message):
|
157 |
if is_success:
|
158 |
model_input.visible = True
|
159 |
query_input.visible = True
|
160 |
summarize_button.visible = True
|
161 |
+
login_result.value = message
|
162 |
login_result.visible = True
|
163 |
|
164 |
login_button.click(check_password, inputs=[password_input], outputs=[login_result]).then(
|