import gradio as gr | |
from gradio_client import Client | |
import os | |
token=os.environ.get("TOKEN") | |
client = Client("Docfile/legalrci") | |
def greet(name): | |
result = client.predict(name, api_name="/predict") | |
return result | |
iface = gr.Interface(fn=greet, inputs=gr.Textbox(label="Question:", lines=4), outputs="text") | |
iface.launch() | |