Spaces:
Sleeping
Sleeping
created app.py
Browse files
app.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import requests
|
3 |
+
import json
|
4 |
+
from findCity import find_city
|
5 |
+
from findWeather import find_weather
|
6 |
+
from finalOutput import final_output
|
7 |
+
|
8 |
+
|
9 |
+
# Create the Gradio interface
|
10 |
+
def chatbot(query):
|
11 |
+
city = find_city(query)
|
12 |
+
weather_data, output = find_weather(city)
|
13 |
+
output2 = final_output(query, weather_data)
|
14 |
+
output3 = output + output2
|
15 |
+
return output3
|
16 |
+
|
17 |
+
|
18 |
+
gr.Interface(fn=chatbot, inputs="text", outputs="text", title="Weather Chatbot").launch()
|