dschandra commited on
Commit
306ec16
·
verified ·
1 Parent(s): 79abf05

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from chatbot import generate_answer
3
+
4
+ def main():
5
+ # Create Gradio Interface
6
+ iface = gr.Interface(
7
+ fn=generate_answer,
8
+ inputs=gr.Textbox(label="Ask a question"),
9
+ outputs=gr.Textbox(label="Answer"),
10
+ title="General Knowledge & Current Affairs Chatbot",
11
+ description="Ask any question, and the bot will provide answers based on general knowledge and current affairs."
12
+ )
13
+ iface.launch()
14
+
15
+ if __name__ == "__main__":
16
+ main()