budhadityac24 commited on
Commit
35038ac
1 Parent(s): 2244d12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -63,10 +63,8 @@ def get_current_weather(location):
63
  # ]
64
 
65
 
66
- def get_response(input_text):
67
- client = Groq(
68
- api_key=os.getenv("GROQ_API_KEY"),
69
- )
70
  tools = [
71
  {
72
  "type": "function",
@@ -148,7 +146,9 @@ def get_response(input_text):
148
 
149
  def main():
150
  st.title("Weather Chatbot")
151
-
 
 
152
  # User input
153
  st.write("Hi, I am a weather chatbot. Ask me anything!")
154
  location = st.text_input("Type in your question")
@@ -158,7 +158,7 @@ def main():
158
  # Check if location is provided
159
  if location:
160
  # Get current weather
161
- response = get_response(location)
162
  # Display weather details
163
  st.json(response)
164
  else:
 
63
  # ]
64
 
65
 
66
+ def get_response(input_text,client):
67
+
 
 
68
  tools = [
69
  {
70
  "type": "function",
 
146
 
147
  def main():
148
  st.title("Weather Chatbot")
149
+ client = Groq(
150
+ api_key=os.getenv("GROQ_API_KEY"),
151
+ )
152
  # User input
153
  st.write("Hi, I am a weather chatbot. Ask me anything!")
154
  location = st.text_input("Type in your question")
 
158
  # Check if location is provided
159
  if location:
160
  # Get current weather
161
+ response = get_response(location,client)
162
  # Display weather details
163
  st.json(response)
164
  else: