Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from gradio_client import Client
|
3 |
+
import os
|
4 |
+
token=os.environ.get("TOKEN")
|
5 |
+
|
6 |
+
client = Client("Docfile/legalrci",hf_token=token)
|
7 |
+
|
8 |
+
def greet(name):
|
9 |
+
result = client.predict(name, api_name="/predict")
|
10 |
+
return result
|
11 |
+
|
12 |
+
iface = gr.Interface(fn=greet,title="Legalrci", inputs=gr.Textbox(label="Question:", lines=4), outputs="text")
|
13 |
+
iface.launch()
|