Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,10 @@ with gr.Blocks() as demo:
|
|
21 |
user_id = gr.Textbox(placeholder="Enter user id for personalization: ")
|
22 |
with gr.Column():
|
23 |
for arxiv_paper in search.results():
|
|
|
|
|
|
|
|
|
24 |
with gr.Column():
|
25 |
with gr.Column():
|
26 |
gr.Markdown("<center><h3>" + arxiv_paper.title + "</h3></center>")
|
@@ -28,9 +32,9 @@ with gr.Blocks() as demo:
|
|
28 |
with gr.Row():
|
29 |
more_button = gr.Button("More like this! π")
|
30 |
# add user id value later
|
31 |
-
more_button.click(hf_data_upload(0,
|
32 |
#button.click(flip_image, inputs=image_input, outputs=image_output)
|
33 |
less_button = gr.Button("Less like this! π")
|
34 |
-
less_button.click(hf_data_upload(0,
|
35 |
|
36 |
demo.launch()
|
|
|
21 |
user_id = gr.Textbox(placeholder="Enter user id for personalization: ")
|
22 |
with gr.Column():
|
23 |
for arxiv_paper in search.results():
|
24 |
+
temp_id = arxiv_paper.entry_id
|
25 |
+
temp_id = temp_id.split("/")[-1]
|
26 |
+
temp_id = temp_id.replace(".", "").replace("v1", "")
|
27 |
+
temp_id = int(temp_id)
|
28 |
with gr.Column():
|
29 |
with gr.Column():
|
30 |
gr.Markdown("<center><h3>" + arxiv_paper.title + "</h3></center>")
|
|
|
32 |
with gr.Row():
|
33 |
more_button = gr.Button("More like this! π")
|
34 |
# add user id value later
|
35 |
+
more_button.click(hf_data_upload(0, temp_id, 1))
|
36 |
#button.click(flip_image, inputs=image_input, outputs=image_output)
|
37 |
less_button = gr.Button("Less like this! π")
|
38 |
+
less_button.click(hf_data_upload(0, temp_id, 0))
|
39 |
|
40 |
demo.launch()
|