Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from function_example import weather_chat_app
|
| 3 |
+
#from function_example import weather_chat_app
|
| 4 |
+
import time
|
| 5 |
+
|
| 6 |
+
def input(message,history):
|
| 7 |
+
return weather_chat_app(message)
|
| 8 |
+
#return f"Current weather in {message} is 22 degree Celsius and clear sky"
|
| 9 |
+
|
| 10 |
+
gr.ChatInterface(fn=input
|
| 11 |
+
,textbox=gr.Textbox(placeholder="Ask about the weather in any city!")
|
| 12 |
+
,title="Weather Bot", description="Ask about the weather in any city!").launch(share=False)
|