MohammadHugging commited on
Commit
1eb85f0
·
verified ·
1 Parent(s): 4c8c11f

update app.[y

Browse files
Files changed (1) hide show
  1. app.py +18 -4
app.py CHANGED
@@ -1,7 +1,21 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ # def greet(name):
4
+ # return "Hello " + name + "!!"
5
 
6
+ # iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
+ # iface.launch()
8
+ from gradio_client import Client
9
+
10
+ client = Client("huggingface-projects/llama-2-13b-chat")
11
+ result = client.predict(
12
+ message="Hello!!",
13
+ request="Hello!!",
14
+ param_3=1024,
15
+ param_4=0.6,
16
+ param_5=0.9,
17
+ param_6=50,
18
+ param_7=1.2,
19
+ api_name="/chat"
20
+ )
21
+ print(result)