Spaces:
Runtime error
Runtime error
Geraldine J
commited on
Commit
·
4d7b640
1
Parent(s):
9d3f2c3
Update json and size
Browse files
app.py
CHANGED
@@ -58,9 +58,9 @@ def qtyEspecies(datax, datay, resImg):
|
|
58 |
numPelicanos = 0
|
59 |
dfEspecies = pd.DataFrame(datax)
|
60 |
for i in range(0, dfEspecies['name'].size):
|
61 |
-
if(dfEspecies['
|
62 |
numLobos= numLobos + 1
|
63 |
-
if(dfEspecies['
|
64 |
numPelicanos= numPelicanos + 1
|
65 |
strlista = '"detail":[{"quantity":"'+str(numLobos)+'","description":"Lobo marino"},{"quantity":"'+str(numPelicanos)+'","description":"Pelicano"}]'
|
66 |
data = '{"image":"'+str(removeStr(datay[0:9]))+'","size":"'+str(removeStr(datay[11:18]))+'",'+strlista+','+resImg+'}'
|
@@ -190,7 +190,7 @@ article ="<p style='text-align: center'><a href='' target='_blank'>Para mas info
|
|
190 |
examples = [['640',0.45, 0.75,'ejemplo1.jpg'], ['640',0.45, 0.75,'ejemplo2.jpg']]
|
191 |
|
192 |
iface = gr.Interface(yolo, inputs=[in1, in2, in3, in4], outputs=[out2,out3,out4], title=title, description=description, article=article, examples=examples,theme="huggingface", analytics_enabled=False).launch(
|
193 |
-
debug=True
|
194 |
|
195 |
iface.launch()
|
196 |
|
|
|
58 |
numPelicanos = 0
|
59 |
dfEspecies = pd.DataFrame(datax)
|
60 |
for i in range(0, dfEspecies['name'].size):
|
61 |
+
if(dfEspecies['class'][i] == 0):
|
62 |
numLobos= numLobos + 1
|
63 |
+
if(dfEspecies['class'][i] == 1):
|
64 |
numPelicanos= numPelicanos + 1
|
65 |
strlista = '"detail":[{"quantity":"'+str(numLobos)+'","description":"Lobo marino"},{"quantity":"'+str(numPelicanos)+'","description":"Pelicano"}]'
|
66 |
data = '{"image":"'+str(removeStr(datay[0:9]))+'","size":"'+str(removeStr(datay[11:18]))+'",'+strlista+','+resImg+'}'
|
|
|
190 |
examples = [['640',0.45, 0.75,'ejemplo1.jpg'], ['640',0.45, 0.75,'ejemplo2.jpg']]
|
191 |
|
192 |
iface = gr.Interface(yolo, inputs=[in1, in2, in3, in4], outputs=[out2,out3,out4], title=title, description=description, article=article, examples=examples,theme="huggingface", analytics_enabled=False).launch(
|
193 |
+
debug=True)
|
194 |
|
195 |
iface.launch()
|
196 |
|