Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -111,7 +111,9 @@ with gr.Blocks(theme=gr.themes.Glass(primary_hue=gr.themes.colors.stone)) as dem
|
|
| 111 |
with gr.Column():
|
| 112 |
file_input = gr.File(type="filepath", label="Upload .pdf file")
|
| 113 |
upload_button = gr.Button(value="Show Image Names")
|
| 114 |
-
|
|
|
|
|
|
|
| 115 |
# output_img_thumb = gr.Image(type="filepath",label="Image Thumbnail")
|
| 116 |
# output_img_thumb = gr.Textbox(label="Image names")
|
| 117 |
with gr.Row():
|
|
@@ -130,7 +132,7 @@ with gr.Blocks(theme=gr.themes.Glass(primary_hue=gr.themes.colors.stone)) as dem
|
|
| 130 |
message = gr.Textbox(label="User", placeholder=prompt)
|
| 131 |
state = gr.State()
|
| 132 |
|
| 133 |
-
upload_button.click(pdf_to_img, inputs=file_input, outputs=[
|
| 134 |
show_button.click(concate_image, inputs=image_name, outputs=output_img)
|
| 135 |
show_concat.click(message_and_history, inputs=[output_img, message, state, api_input], outputs=[chatbot, state])
|
| 136 |
message.submit(message_and_history, inputs=[output_img, message, state, api_input], outputs=[chatbot, state])
|
|
|
|
| 111 |
with gr.Column():
|
| 112 |
file_input = gr.File(type="filepath", label="Upload .pdf file")
|
| 113 |
upload_button = gr.Button(value="Show Image Names")
|
| 114 |
+
img_gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery", object_fit="contain", height="auto",allow_preview=True,preview=True)
|
| 115 |
+
|
| 116 |
+
# output_img_name = gr.Textbox(label="Image names")
|
| 117 |
# output_img_thumb = gr.Image(type="filepath",label="Image Thumbnail")
|
| 118 |
# output_img_thumb = gr.Textbox(label="Image names")
|
| 119 |
with gr.Row():
|
|
|
|
| 132 |
message = gr.Textbox(label="User", placeholder=prompt)
|
| 133 |
state = gr.State()
|
| 134 |
|
| 135 |
+
upload_button.click(pdf_to_img, inputs=file_input, outputs=[img_gallery])
|
| 136 |
show_button.click(concate_image, inputs=image_name, outputs=output_img)
|
| 137 |
show_concat.click(message_and_history, inputs=[output_img, message, state, api_input], outputs=[chatbot, state])
|
| 138 |
message.submit(message_and_history, inputs=[output_img, message, state, api_input], outputs=[chatbot, state])
|