Spaces:
Build error
Build error
import gradio as gr | |
# Function to integrate with Gradio | |
def rag_chatbot(query): | |
answer_text = ask(query, return_answer_only=True) # This ensures we only get the answer | |
return answer_text | |
# Gradio interface setup | |
interface = gr.Interface( | |
fn=rag_chatbot, | |
inputs="text", | |
outputs="text", | |
title="RAG Chatbot", | |
description="This is a Retrieval-Augmented Generation (RAG) Chatbot for Information Retrieval Textbook queries." | |
) | |
# Launch the Gradio app | |
interface.launch(share = True) |