Vihang28 commited on
Commit
c6d66a6
·
verified ·
1 Parent(s): 9820902

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -33
app.py CHANGED
@@ -25,42 +25,23 @@ def show_images(image_name):
25
 
26
  title = "Compare the Graphs"
27
 
28
- # block = gr.Blocks(title=title)
29
- # with block:
30
- # gr.Markdown(f'<h1 style="text-align: center;">{title}</h1>')
31
- # with gr.Row():
32
- # with gr.Row():
33
- # with gr.Column():
34
- # file_input = gr.File(type="filepath")
35
- # upload_button = gr.Button(value="Show")
36
- # # with gr.Column():
37
- # output_img_name = gr.Textbox(label="All Image names")
38
- # upload_button.click(pdf_to_img, inputs=file_input, outputs=output_img_name)
39
-
40
- # with gr.Row():
41
- # with gr.Column():
42
- # image_name = gr.Textbox(label="Mention Image to Show")
43
- # show_button = gr.Button(value="Show")
44
- # # with gr.Column():
45
- # output_img = gr.Image(type="filepath")
46
- # show_button.click(show_images, inputs=image_name, outputs=output_img)
47
- # block.launch()
48
-
49
  block = gr.Blocks(title=title)
50
  with block:
51
  gr.Markdown(f'<h1 style="text-align: center;">{title}</h1>')
52
- with gr.Column():
53
  with gr.Row():
54
- file_input = gr.File(type="filepath")
55
- output_img_name = gr.Textbox(label="All Image names")
56
- gr.Markdown(f'<br>')
57
- image_name = gr.Textbox(label="Mention Image to Show")
58
- output_img = gr.Image(type="filepath")
 
 
59
  with gr.Row():
60
- upload_button = gr.Button(value="Show Image Names")
61
- show_button = gr.Button(value="Show Selected Image")
62
-
63
-
64
- upload_button.click(pdf_to_img, inputs=file_input, outputs=output_img_name)
65
- show_button.click(show_images, inputs=image_name, outputs=output_img)
66
  block.launch()
 
25
 
26
  title = "Compare the Graphs"
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  block = gr.Blocks(title=title)
29
  with block:
30
  gr.Markdown(f'<h1 style="text-align: center;">{title}</h1>')
31
+ with gr.Row():
32
  with gr.Row():
33
+ with gr.Column():
34
+ file_input = gr.File(type="filepath")
35
+ upload_button = gr.Button(value="Show")
36
+ # with gr.Column():
37
+ output_img_name = gr.Textbox(label="All Image names")
38
+ upload_button.click(pdf_to_img, inputs=file_input, outputs=output_img_name)
39
+
40
  with gr.Row():
41
+ with gr.Column():
42
+ image_name = gr.Textbox(label="Mention Image to Show")
43
+ show_button = gr.Button(value="Show")
44
+ # with gr.Column():
45
+ output_img = gr.Image(type="filepath")
46
+ show_button.click(show_images, inputs=image_name, outputs=output_img)
47
  block.launch()