Spaces:
Runtime error
Runtime error
Commit
路
d49eff8
1
Parent(s):
c010362
more fields
Browse files- app.py +26 -4
- boe_crawler.py +1 -1
- images/grafica.png +0 -0
- proyectos_empresas_full.csv +0 -0
app.py
CHANGED
@@ -114,6 +114,19 @@ def respond(
|
|
114 |
"""
|
115 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
116 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
css = "#component-2 {height: 350px}"
|
118 |
def search(term):
|
119 |
|
@@ -143,9 +156,18 @@ with gr.Blocks(title="SPAIN WIND ENERGY LOBBY") as app:
|
|
143 |
# with gr.Row():
|
144 |
|
145 |
with gr.Row():
|
146 |
-
|
147 |
-
|
148 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
with gr.Row():
|
151 |
to_convert = gr.Textbox(value="Forestalia",label="Search",scale=4)
|
@@ -163,4 +185,4 @@ with gr.Blocks(title="SPAIN WIND ENERGY LOBBY") as app:
|
|
163 |
|
164 |
|
165 |
if __name__ == "__main__":
|
166 |
-
app.launch()
|
|
|
114 |
"""
|
115 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
116 |
"""
|
117 |
+
|
118 |
+
from PIL import Image
|
119 |
+
|
120 |
+
# Ruta a la imagen en tu disco
|
121 |
+
image_path = "images/grafica.png"
|
122 |
+
|
123 |
+
def load_image():
|
124 |
+
# Cargar la imagen desde el disco
|
125 |
+
img = Image.open(image_path)
|
126 |
+
return img
|
127 |
+
|
128 |
+
|
129 |
+
|
130 |
css = "#component-2 {height: 350px}"
|
131 |
def search(term):
|
132 |
|
|
|
156 |
# with gr.Row():
|
157 |
|
158 |
with gr.Row():
|
159 |
+
from PIL import Image
|
160 |
+
|
161 |
+
gr.Interface(
|
162 |
+
fn=load_image, # La funci贸n que carga y devuelve la imagen
|
163 |
+
inputs=[], # No hay entradas desde el usuario
|
164 |
+
outputs="image", # Salida es una imagen
|
165 |
+
title="", # T铆tulo de la app
|
166 |
+
description="" # Descripci贸n
|
167 |
+
)
|
168 |
+
#gr.Plot(label="MW por promotor")
|
169 |
+
#gr.Plot(label="Ubicaci贸n por promotor")
|
170 |
+
#gr.Plot(label="Potencia promotor por ubicaci煤n")
|
171 |
|
172 |
with gr.Row():
|
173 |
to_convert = gr.Textbox(value="Forestalia",label="Search",scale=4)
|
|
|
185 |
|
186 |
|
187 |
if __name__ == "__main__":
|
188 |
+
app.launch()
|
boe_crawler.py
CHANGED
@@ -64,7 +64,7 @@ for index, row in df.iterrows():
|
|
64 |
if(len(nombre_empresa)<100):
|
65 |
print("Proyecto: "+nombre_proyecto+", Promotor: "+promotor+", Fiscal: "+nombre_empresa)
|
66 |
#print(row)
|
67 |
-
output.write(str(row[0])+","+str(row[1])+","+str(row[2])+","+str(row[3])+","+str(row[4])+","+str(row[5])+","+str(row[6])+","+str(row[7])+","+nombre_empresa+"\n")
|
68 |
print(row)
|
69 |
# A帽ade el resultado a la lista
|
70 |
resultados.append([nombre_proyecto, url_boe, nombre_empresa])
|
|
|
64 |
if(len(nombre_empresa)<100):
|
65 |
print("Proyecto: "+nombre_proyecto+", Promotor: "+promotor+", Fiscal: "+nombre_empresa)
|
66 |
#print(row)
|
67 |
+
output.write(str(row[0])+","+str(row[1])+","+str(row[2])+","+str(row[3])+","+str(row[4])+","+str(row[5])+","+str(row[6])+","+str(row[7])+","+str(row[8])+","+str(row[9])+","+str(row[10])+","+str(row[11])+","+str(row[12])+","+str(row[14])+","+nombre_empresa+"\n")
|
68 |
print(row)
|
69 |
# A帽ade el resultado a la lista
|
70 |
resultados.append([nombre_proyecto, url_boe, nombre_empresa])
|
images/grafica.png
ADDED
![]() |
proyectos_empresas_full.csv
CHANGED
The diff for this file is too large to render.
See raw diff
|
|