Zled commited on
Commit
62b6724
·
verified ·
1 Parent(s): 288d804

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ from gradio_client import Client
4
+ import gradio as gr
5
+
6
+ HF_TOKEN = os.environ.get("HF_TOKEN")
7
+ client = Client("maruthlabs/madhuram", hf_token = HF_TOKEN)
8
+ def reply(ques, history):
9
+ print(ques)
10
+ result = client.predict(
11
+ message=ques,
12
+ api_name="/chat"
13
+ )
14
+
15
+ return result
16
+
17
+
18
+ demo = gr.ChatInterface(fn=reply, type="messages")
19
+
20
+ if __name__ == "__main__":
21
+ demo.launch()
22
+