Ariel
commited on
Commit
·
3ae0e3a
1
Parent(s):
8547388
edit logo
Browse files
app.py
CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
|
|
2 |
import os
|
3 |
from SolarPanelDetector import solar_panel_predict, detector
|
4 |
|
5 |
-
|
6 |
custom_css = """
|
7 |
.feedback textarea {font-size: 20px !important;}
|
8 |
.centered-text {text-align: center; width: 100%;}
|
@@ -11,11 +10,10 @@ custom_css = """
|
|
11 |
logo_url = 'https://raw.githubusercontent.com/ArielDrabkin/Solar-Panel-Detector/master/deployment/examples/DALL-E.jpeg'
|
12 |
|
13 |
with gr.Blocks(theme="HaleyCH/HaleyCH_Theme", title="Solar Panel Detector", css=custom_css) as app:
|
14 |
-
# add logo
|
15 |
gr.Markdown("# **Solar Panel Detector 2.0** 🛰️☀️", elem_classes="centered-text")
|
16 |
-
# Create an image component
|
17 |
with gr.Row(elem_classes="center-image"):
|
18 |
-
gr.Image(logo_url, scale=1, height=400, width=700, show_label=False, show_download_button=False,
|
|
|
19 |
gr.Markdown("## This app provides the ability to detect solar panels in a given address or a given image.")
|
20 |
|
21 |
gr.Markdown("### Using by address with google maps:\n1. Enter an address or geographic coordinates.\n"
|
@@ -26,6 +24,7 @@ with gr.Blocks(theme="HaleyCH/HaleyCH_Theme", title="Solar Panel Detector", css=
|
|
26 |
api_key = gr.Textbox(label="Google maps api key", type="password")
|
27 |
zoom = gr.Slider(minimum=18, maximum=22, step=1, value=19, label="zoom")
|
28 |
btn = gr.Button(value="Submit")
|
|
|
29 |
with gr.Row():
|
30 |
predicted_image_address = gr.Image(type="pil", show_label=False, scale=1)
|
31 |
prediction_address = gr.Textbox(type="text", show_label=False, scale=1, elem_classes="feedback")
|
|
|
2 |
import os
|
3 |
from SolarPanelDetector import solar_panel_predict, detector
|
4 |
|
|
|
5 |
custom_css = """
|
6 |
.feedback textarea {font-size: 20px !important;}
|
7 |
.centered-text {text-align: center; width: 100%;}
|
|
|
10 |
logo_url = 'https://raw.githubusercontent.com/ArielDrabkin/Solar-Panel-Detector/master/deployment/examples/DALL-E.jpeg'
|
11 |
|
12 |
with gr.Blocks(theme="HaleyCH/HaleyCH_Theme", title="Solar Panel Detector", css=custom_css) as app:
|
|
|
13 |
gr.Markdown("# **Solar Panel Detector 2.0** 🛰️☀️", elem_classes="centered-text")
|
|
|
14 |
with gr.Row(elem_classes="center-image"):
|
15 |
+
gr.Image(logo_url, scale=1, height=400, width=700, show_label=False, show_download_button=False,
|
16 |
+
show_share_button=False)
|
17 |
gr.Markdown("## This app provides the ability to detect solar panels in a given address or a given image.")
|
18 |
|
19 |
gr.Markdown("### Using by address with google maps:\n1. Enter an address or geographic coordinates.\n"
|
|
|
24 |
api_key = gr.Textbox(label="Google maps api key", type="password")
|
25 |
zoom = gr.Slider(minimum=18, maximum=22, step=1, value=19, label="zoom")
|
26 |
btn = gr.Button(value="Submit")
|
27 |
+
|
28 |
with gr.Row():
|
29 |
predicted_image_address = gr.Image(type="pil", show_label=False, scale=1)
|
30 |
prediction_address = gr.Textbox(type="text", show_label=False, scale=1, elem_classes="feedback")
|