Spaces:
Build error
Build error
Commit ·
932ce4c
1
Parent(s): 9570b85
reset to original
Browse files
app.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
-
import os
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
def respond(
|
| 9 |
message,
|
|
|
|
| 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
|
| 6 |
+
"""
|
| 7 |
+
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 8 |
+
|
| 9 |
|
| 10 |
def respond(
|
| 11 |
message,
|
asd.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from gradio_client import Client
|
| 2 |
+
|
| 3 |
+
client = Client("GaborToth2/chat")
|
| 4 |
+
result = client.predict(
|
| 5 |
+
message="Hello!!",
|
| 6 |
+
system_message="You are a friendly Chatbot.",
|
| 7 |
+
max_tokens=4,
|
| 8 |
+
temperature=0.7,
|
| 9 |
+
top_p=0.95,
|
| 10 |
+
api_name="/chat"
|
| 11 |
+
)
|
| 12 |
+
print(result)
|