Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,8 @@ from huggingface_hub import InferenceClient
|
|
| 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(
|
|
@@ -27,17 +28,17 @@ def respond(
|
|
| 27 |
|
| 28 |
response = ""
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
|
| 42 |
"""
|
| 43 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
|
|
|
| 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 |
+
from gradio_client import Client
|
| 9 |
|
| 10 |
|
| 11 |
def respond(
|
|
|
|
| 28 |
|
| 29 |
response = ""
|
| 30 |
|
| 31 |
+
client = Client("ByteDance/Hyper-SDXL-1Step-T2I")
|
| 32 |
+
result = client.predict(
|
| 33 |
+
num_images=4,
|
| 34 |
+
height=1024,
|
| 35 |
+
width=1024,
|
| 36 |
+
prompt="a photo of a cat",
|
| 37 |
+
seed=3413,
|
| 38 |
+
api_name="/process_image"
|
| 39 |
+
)
|
| 40 |
+
yield(result)
|
| 41 |
+
|
| 42 |
|
| 43 |
"""
|
| 44 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|