Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,8 @@ def load_names_from_url(jsonld_url):
|
|
16 |
return names
|
17 |
|
18 |
# Carregar nomes do arquivo JSON-LD
|
19 |
-
|
|
|
20 |
|
21 |
def run_query_and_visualize(qtext, jsonld_url):
|
22 |
print("Executando consulta SPARQL...")
|
@@ -81,7 +82,7 @@ with gr.Blocks() as demo:
|
|
81 |
selected_location.change(fn=on_location_change, inputs=selected_location, outputs=query_input)
|
82 |
|
83 |
def on_run_button_click(query):
|
84 |
-
return run_query_and_visualize(query,
|
85 |
|
86 |
run_button.click(fn=on_run_button_click, inputs=[query_input], outputs=graph_output)
|
87 |
|
|
|
16 |
return names
|
17 |
|
18 |
# Carregar nomes do arquivo JSON-LD
|
19 |
+
jsonld_url = 'https://huggingface.co/spaces/histlearn/ShowGraph/raw/main/datafile.jsonld'
|
20 |
+
names = load_names_from_url(jsonld_url)
|
21 |
|
22 |
def run_query_and_visualize(qtext, jsonld_url):
|
23 |
print("Executando consulta SPARQL...")
|
|
|
82 |
selected_location.change(fn=on_location_change, inputs=selected_location, outputs=query_input)
|
83 |
|
84 |
def on_run_button_click(query):
|
85 |
+
return run_query_and_visualize(query, jsonld_url)
|
86 |
|
87 |
run_button.click(fn=on_run_button_click, inputs=[query_input], outputs=graph_output)
|
88 |
|