Vihang28 commited on
Commit
d0a42ea
·
verified ·
1 Parent(s): 2597295

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -19,6 +19,10 @@ def pdf_to_img(pdf_path):
19
  img_list.append(f"image{counter}.{extention}")
20
  counter += 1
21
  return img_list
 
 
 
 
22
  title = "Compare the Graphs"
23
 
24
  block = gr.Blocks(title=title)
@@ -29,6 +33,14 @@ with block:
29
  file_input = gr.File(type="filepath")
30
  upload_button = gr.Button(value="Show")
31
  with gr.Column():
32
- output_img = gr.Textbox(label="")
33
- upload_button.click(pdf_to_img, inputs=file_input, outputs=output_img)
 
 
 
 
 
 
 
 
34
  block.launch()
 
19
  img_list.append(f"image{counter}.{extention}")
20
  counter += 1
21
  return img_list
22
+
23
+ def show_images(image_name):
24
+ return image_name
25
+
26
  title = "Compare the Graphs"
27
 
28
  block = gr.Blocks(title=title)
 
33
  file_input = gr.File(type="filepath")
34
  upload_button = gr.Button(value="Show")
35
  with gr.Column():
36
+ output_img_name = gr.Textbox(label="All Image names")
37
+ upload_button.click(pdf_to_img, inputs=file_input, outputs=output_img_name)
38
+
39
+ with gr.Row():
40
+ with gr.Column(scale=0.5):
41
+ image_name = gr.Textbox(label="Mention Image to Show")
42
+ show_button = gr.Button(value="Show")
43
+ with gr.Column():
44
+ output_img = gr.Image(type="filepath")
45
+ upload_button.click(pdf_to_img, inputs=image_name, outputs=output_img)
46
  block.launch()