DreamStream-1 commited on
Commit
0bf96c0
·
verified ·
1 Parent(s): f606e6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
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 = "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,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()