content / untitled
AmiDwivedi's picture
Upload folder using huggingface_hub
c7ed333 verified
raw
history blame
507 Bytes
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)