Sev-X commited on
Commit
326b6ed
·
verified ·
1 Parent(s): a7e512b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -1,5 +1,17 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  """
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
@@ -58,18 +70,5 @@ demo = gr.ChatInterface(
58
  ],
59
  )
60
 
61
- from gradio_client import Client
62
-
63
- client = Client("Sev-X/Test-AI")
64
- result = client.predict(
65
- message="Hello!!",
66
- system_message="You are a friendly Chatbot.",
67
- max_tokens=512,
68
- temperature=0.7,
69
- top_p=0.95,
70
- api_name="/chat"
71
- )
72
- print(result)
73
-
74
  if __name__ == "__main__":
75
  demo.launch()
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
+ from gradio_client import Client
4
+
5
+ client = Client("Sev-X/Test-AI")
6
+ result = client.predict(
7
+ message="Hello!!",
8
+ system_message="You are a friendly Chatbot.",
9
+ max_tokens=512,
10
+ temperature=0.7,
11
+ top_p=0.95,
12
+ api_name="/chat"
13
+ )
14
+ print(result)
15
 
16
  """
17
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
 
70
  ],
71
  )
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  if __name__ == "__main__":
74
  demo.launch()