File size: 468 Bytes
6fd502a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr
import requests
import json
from findCity import find_city
from findWeather import find_weather
from finalOutput import final_output


# Create the Gradio interface
def chatbot(query):
    city = find_city(query)
    weather_data, output = find_weather(city)
    output2 = final_output(query, weather_data)
    output3 = output + output2
    return output3


gr.Interface(fn=chatbot, inputs="text", outputs="text", title="Weather Chatbot").launch()