Spaces:
Sleeping
Sleeping
File size: 416 Bytes
3f0f670 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import gradio as gr
from indexer import index_text, answer_query
def rag_system(input_text, query):
vectorstore = index_text(input_text)
answer = answer_query(query, vectorstore)
return answer
iface = gr.Interface(
fn=rag_system,
inputs=["text","text"],
outputs="text",
title="RAG QA System",
description="Enter a text and ask questions based on the input text."
)
iface.launch() |