Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def timer(message,start_time=None):
|
|
25 |
print('\n'+message+' Time taken: %i hours %i minutes and %s seconds.' % (thour, tmin, round(tsec, 2)))
|
26 |
|
27 |
##
|
28 |
-
def predict(lat, lon):
|
29 |
cord = [lon,lat]
|
30 |
lon = round(lon,4)
|
31 |
lat = round(lat,4)
|
@@ -121,7 +121,7 @@ article = "Created by data354."
|
|
121 |
|
122 |
# Create examples list from "examples/" directory
|
123 |
#example_list = [["examples/" + example] for example in os.listdir("examples")]
|
124 |
-
example_list = [[5.379913, -4.050445],[5.363292, -3.9481601],[5.316458, -4.017172],[5.346938, -4.027849]]
|
125 |
|
126 |
outputs = [
|
127 |
gr.Textbox(label="Cloud coverage"),
|
@@ -133,7 +133,7 @@ outputs = [
|
|
133 |
|
134 |
demo = gr.Interface(
|
135 |
fn=predict,
|
136 |
-
inputs=["number", "number"],
|
137 |
outputs=outputs, #[ "text", "text","text","text","text"],
|
138 |
examples=example_list,
|
139 |
title=title,
|
|
|
25 |
print('\n'+message+' Time taken: %i hours %i minutes and %s seconds.' % (thour, tmin, round(tsec, 2)))
|
26 |
|
27 |
##
|
28 |
+
def predict(location_name,lat, lon):
|
29 |
cord = [lon,lat]
|
30 |
lon = round(lon,4)
|
31 |
lat = round(lat,4)
|
|
|
121 |
|
122 |
# Create examples list from "examples/" directory
|
123 |
#example_list = [["examples/" + example] for example in os.listdir("examples")]
|
124 |
+
example_list = [["Foret du banco :",5.379913, -4.050445],["Pharmacie Y4 :",5.363292, -3.9481601],["Hotel ivoire : ",5.316458, -4.017172],["Adjamé :",5.346938, -4.027849]]
|
125 |
|
126 |
outputs = [
|
127 |
gr.Textbox(label="Cloud coverage"),
|
|
|
133 |
|
134 |
demo = gr.Interface(
|
135 |
fn=predict,
|
136 |
+
inputs=["text","number", "number"],
|
137 |
outputs=outputs, #[ "text", "text","text","text","text"],
|
138 |
examples=example_list,
|
139 |
title=title,
|