Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -85,17 +85,18 @@ with gr.Blocks() as demo:
|
|
85 |
gr.Markdown("# ")
|
86 |
with gr.Row():
|
87 |
ort_input = gr.Textbox(label="Ort", placeholder="Gib den Namen des Ortes ein")
|
88 |
-
links_output = gr.Textbox(label="")
|
89 |
#links_output = gr.Markdown(label="Ergebnisse")
|
90 |
json_output = gr.JSON(label="Ergebnisse")
|
91 |
|
92 |
def process_ort(ort):
|
93 |
links = parse_links_and_content(ort)
|
|
|
94 |
contact= scrape_links(links)
|
95 |
json_data = [json.loads(item) for item in contact]
|
96 |
-
save_to_csv(json_data, './contact_details.csv')
|
97 |
-
return f"[Download CSV](contact_details.csv)", json_data
|
98 |
-
return
|
99 |
#return contact
|
100 |
#return pd.DataFrame(json_data)
|
101 |
#return json_data
|
|
|
85 |
gr.Markdown("# ")
|
86 |
with gr.Row():
|
87 |
ort_input = gr.Textbox(label="Ort", placeholder="Gib den Namen des Ortes ein")
|
88 |
+
#links_output = gr.Textbox(label="Vereinsliste")
|
89 |
#links_output = gr.Markdown(label="Ergebnisse")
|
90 |
json_output = gr.JSON(label="Ergebnisse")
|
91 |
|
92 |
def process_ort(ort):
|
93 |
links = parse_links_and_content(ort)
|
94 |
+
return links
|
95 |
contact= scrape_links(links)
|
96 |
json_data = [json.loads(item) for item in contact]
|
97 |
+
#save_to_csv(json_data, './contact_details.csv')
|
98 |
+
#return f"[Download CSV](contact_details.csv)", json_data
|
99 |
+
return json_data
|
100 |
#return contact
|
101 |
#return pd.DataFrame(json_data)
|
102 |
#return json_data
|