AbdullahAj2000 commited on
Commit
443261c
·
verified ·
1 Parent(s): edfaab4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -15
app.py CHANGED
@@ -18,19 +18,7 @@ def location(place):
18
  elif place == "Wadi Rum":
19
  map_link = "https://www.google.com/maps/search/wadi+rum/@29.556416,35.3964418,14z/data=!3m1!4b1?entry=ttu"
20
 
21
- google_map =f'''
22
- <!DOCTYPE html>
23
- <html>
24
- <head>
25
- <title>Map Display</title>
26
- </head>
27
- <body>
28
- <h1>Map Display</h1>
29
- <iframe width="600" height="450" frameborder="0" style="border:0" src="{map_link}" allowfullscreen></iframe>
30
- </body>
31
- </html>
32
- '''
33
- return google_map
34
 
35
 
36
  def load_image_with_cv2(image_path):
@@ -76,8 +64,21 @@ def show_preds_image(image_path,model_selection):
76
  conf = (classify_image(image_path,model_selection))
77
  html = f'<p>petra</p><a href="https://www.gradio.app/docs/examples" target="_blank">"https://www.gradio.app/docs/examples"</a>'
78
 
79
- google_map = location(mux_value)
80
- return img,conf,html,google_map,mux_value
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
 
83
  inputs_image = gr.Image(type="filepath", label="Input Image")
 
18
  elif place == "Wadi Rum":
19
  map_link = "https://www.google.com/maps/search/wadi+rum/@29.556416,35.3964418,14z/data=!3m1!4b1?entry=ttu"
20
 
21
+ return map_link
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
 
24
  def load_image_with_cv2(image_path):
 
64
  conf = (classify_image(image_path,model_selection))
65
  html = f'<p>petra</p><a href="https://www.gradio.app/docs/examples" target="_blank">"https://www.gradio.app/docs/examples"</a>'
66
 
67
+ map_l = location(mux_value)
68
+ google_map =f'''
69
+ <!DOCTYPE html>
70
+ <html>
71
+ <head>
72
+ <title>Map Display</title>
73
+ </head>
74
+ <body>
75
+ <h1>Map Display</h1>
76
+ <iframe width="600" height="450" frameborder="0" style="border:0" src="{map_l}" allowfullscreen></iframe>
77
+ </body>
78
+ </html>
79
+ '''
80
+ return google_map
81
+ return img,conf,html,google_map,map_l
82
 
83
 
84
  inputs_image = gr.Image(type="filepath", label="Input Image")