Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -256,6 +256,17 @@ with gr.Blocks() as demo:
|
|
256 |
gr.Markdown("### JS Content")
|
257 |
js_content_output = gr.Textbox(label="JS Content", interactive=True)
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
# Tab 2: Model to Text Converter
|
260 |
with gr.Tab("Model to Text Converter"):
|
261 |
gr.Markdown("## Model to Text Converter")
|
|
|
256 |
gr.Markdown("### JS Content")
|
257 |
js_content_output = gr.Textbox(label="JS Content", interactive=True)
|
258 |
|
259 |
+
# Add image previews
|
260 |
+
gr.Markdown("### Image Previews")
|
261 |
+
image_previews = gr.Gallery(label="Image Previews")
|
262 |
+
|
263 |
+
# Update the image previews
|
264 |
+
submit_button.click(
|
265 |
+
fn=lambda img_links: [requests.get(link).content for link in img_links],
|
266 |
+
inputs=img_output,
|
267 |
+
outputs=image_previews
|
268 |
+
)
|
269 |
+
|
270 |
# Tab 2: Model to Text Converter
|
271 |
with gr.Tab("Model to Text Converter"):
|
272 |
gr.Markdown("## Model to Text Converter")
|