Spaces:
Build error
Build error
| import gradio as gr | |
| from chatbot import generate_answer | |
| def main(): | |
| # Create Gradio Interface | |
| iface = gr.Interface( | |
| fn=generate_answer, | |
| inputs=gr.Textbox(label="Ask a question"), | |
| outputs=gr.Textbox(label="Answer"), | |
| title="General Knowledge & Current Affairs Chatbot", | |
| description="Ask any question, and the bot will provide answers based on general knowledge and current affairs." | |
| ) | |
| iface.launch() | |
| if __name__ == "__main__": | |
| main() |