File size: 399 Bytes
431117f d6ce8de |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
from huggingface_hub import InferenceClient
import spaces
from rag import RAG
r = RAG()
@spaces.GPU
def respond(text,history):
return r.query(text)
demo = gr.ChatInterface(
respond,
title="LAW LM",
description="Ask legal questions",
chatbot=gr.Chatbot(placeholder="Type your text here...")
)
if __name__ == "__main__":
demo.launch() |