Update app.py
Browse files
app.py
CHANGED
@@ -197,8 +197,10 @@ def generate_caption(protein, prompt):
|
|
197 |
|
198 |
|
199 |
def save_feedback(inputs):
|
|
|
200 |
with open('feedback.txt', 'a+') as f:
|
201 |
f.write(inputs+'\n')
|
|
|
202 |
|
203 |
|
204 |
# Define the FAPM interface
|
@@ -260,7 +262,8 @@ with gr.Blocks(css=css) as demo:
|
|
260 |
with gr.Row():
|
261 |
with gr.Column():
|
262 |
inputs = gr.Textbox(type="text")
|
|
|
263 |
feedback_btn = gr.Button(value="Submit")
|
264 |
-
feedback_btn.click(save_feedback, [inputs])
|
265 |
demo.launch(debug=True)
|
266 |
|
|
|
197 |
|
198 |
|
199 |
def save_feedback(inputs):
|
200 |
+
print(inputs)
|
201 |
with open('feedback.txt', 'a+') as f:
|
202 |
f.write(inputs+'\n')
|
203 |
+
return "Thanks your advice!"
|
204 |
|
205 |
|
206 |
# Define the FAPM interface
|
|
|
262 |
with gr.Row():
|
263 |
with gr.Column():
|
264 |
inputs = gr.Textbox(type="text")
|
265 |
+
output_markdown = gr.Markdown(label="Output")
|
266 |
feedback_btn = gr.Button(value="Submit")
|
267 |
+
feedback_btn.click(save_feedback, [inputs], [output_markdown])
|
268 |
demo.launch(debug=True)
|
269 |
|