Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -150,7 +150,7 @@ def provide_suggestions(emotion):
|
|
150 |
return suggestions
|
151 |
|
152 |
# Google Places API to get nearby wellness professionals
|
153 |
-
api_key = "
|
154 |
|
155 |
def get_places_data(query, location, radius, api_key, next_page_token=None):
|
156 |
url = "https://maps.googleapis.com/maps/api/place/textsearch/json"
|
@@ -221,3 +221,17 @@ iface = gr.Interface(
|
|
221 |
inputs=[
|
222 |
gr.Textbox(label="Enter your message", placeholder="How are you feeling today?"),
|
223 |
gr.Textbox(label="Enter your location (e.g., Hawaii, Oahu)", placeholder="Your location"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
return suggestions
|
151 |
|
152 |
# Google Places API to get nearby wellness professionals
|
153 |
+
api_key = "YOUR_GOOGLE_API_KEY" # Replace with your actual API key
|
154 |
|
155 |
def get_places_data(query, location, radius, api_key, next_page_token=None):
|
156 |
url = "https://maps.googleapis.com/maps/api/place/textsearch/json"
|
|
|
221 |
inputs=[
|
222 |
gr.Textbox(label="Enter your message", placeholder="How are you feeling today?"),
|
223 |
gr.Textbox(label="Enter your location (e.g., Hawaii, Oahu)", placeholder="Your location"),
|
224 |
+
gr.State() # One state input
|
225 |
+
],
|
226 |
+
outputs=[
|
227 |
+
gr.Chatbot(label="Chat History"),
|
228 |
+
gr.Textbox(label="Sentiment Analysis"),
|
229 |
+
gr.Textbox(label="Emotion Detected"),
|
230 |
+
gr.DataFrame(label="Suggestions for Wellness"),
|
231 |
+
gr.DataFrame(label="Nearby Wellness Professionals")
|
232 |
+
],
|
233 |
+
live=True
|
234 |
+
)
|
235 |
+
|
236 |
+
# Launch the interface
|
237 |
+
iface.launch()
|