Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,6 +52,10 @@ def fetch_data_as_json():
|
|
| 52 |
# Return the JSON result
|
| 53 |
return json_result
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
print(json_result)
|
| 56 |
|
| 57 |
get_window_url_params = """
|
|
@@ -79,7 +83,7 @@ with gr.Blocks() as demo:
|
|
| 79 |
{json.dumps(url_params, indent=4)}
|
| 80 |
"""
|
| 81 |
else:
|
| 82 |
-
bot_message = "You did not ask for the URL Params :) But here is what I read from the database:" +
|
| 83 |
history[-1][1] = bot_message
|
| 84 |
time.sleep(1)
|
| 85 |
return history
|
|
|
|
| 52 |
# Return the JSON result
|
| 53 |
return json_result
|
| 54 |
|
| 55 |
+
# Call the function to fetch data as JSON
|
| 56 |
+
json_result = fetch_data_as_json()
|
| 57 |
+
|
| 58 |
+
# Print or use the json_result variable as needed
|
| 59 |
print(json_result)
|
| 60 |
|
| 61 |
get_window_url_params = """
|
|
|
|
| 83 |
{json.dumps(url_params, indent=4)}
|
| 84 |
"""
|
| 85 |
else:
|
| 86 |
+
bot_message = "You did not ask for the URL Params :) But here is what I read from the database:" + json_result
|
| 87 |
history[-1][1] = bot_message
|
| 88 |
time.sleep(1)
|
| 89 |
return history
|