Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,18 +70,6 @@ def get_window_url_params():
|
|
| 70 |
}
|
| 71 |
"""
|
| 72 |
|
| 73 |
-
|
| 74 |
-
url_params = gr.JSON({}, visible=False, label="URL Params")
|
| 75 |
-
print(url_params)
|
| 76 |
-
#session_index = url_params.get('session_index')
|
| 77 |
-
#print(session_index)
|
| 78 |
-
|
| 79 |
-
# Fetch personalized data
|
| 80 |
-
#personalized_data = fetch_personalized_data(session_index)
|
| 81 |
-
#print(personalized_data)
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
'''
|
| 85 |
with gr.Blocks() as demo:
|
| 86 |
gr.Markdown("""## Gradio send queryparam to chatbot
|
| 87 |
type `read query`
|
|
@@ -105,13 +93,6 @@ with gr.Blocks() as demo:
|
|
| 105 |
# Fetch personalized data
|
| 106 |
personalized_data = fetch_personalized_data(session_index)
|
| 107 |
print(personalized_data)
|
| 108 |
-
|
| 109 |
-
#if personalized_data:
|
| 110 |
-
# bot_message = "Personalized data fetched successfully."
|
| 111 |
-
# return [[bot_message, None]]
|
| 112 |
-
#else:
|
| 113 |
-
# bot_message = "Error fetching personalized data."
|
| 114 |
-
# return [[bot_message, None]]
|
| 115 |
else:
|
| 116 |
bot_message = "There was an error. Please try again."
|
| 117 |
history[-1][1] = bot_message
|
|
@@ -132,5 +113,4 @@ with gr.Blocks() as demo:
|
|
| 132 |
queue=False
|
| 133 |
)
|
| 134 |
|
| 135 |
-
demo.launch()
|
| 136 |
-
'''
|
|
|
|
| 70 |
}
|
| 71 |
"""
|
| 72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
with gr.Blocks() as demo:
|
| 74 |
gr.Markdown("""## Gradio send queryparam to chatbot
|
| 75 |
type `read query`
|
|
|
|
| 93 |
# Fetch personalized data
|
| 94 |
personalized_data = fetch_personalized_data(session_index)
|
| 95 |
print(personalized_data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
else:
|
| 97 |
bot_message = "There was an error. Please try again."
|
| 98 |
history[-1][1] = bot_message
|
|
|
|
| 113 |
queue=False
|
| 114 |
)
|
| 115 |
|
| 116 |
+
demo.launch()
|
|
|