Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,7 @@
|
|
| 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 |
|
|
@@ -39,10 +37,8 @@ def respond(
|
|
| 39 |
response += token
|
| 40 |
yield response
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
"""
|
| 45 |
-
demo = gr.ChatInterface(
|
| 46 |
respond,
|
| 47 |
additional_inputs=[
|
| 48 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
|
@@ -58,6 +54,15 @@ demo = gr.ChatInterface(
|
|
| 58 |
],
|
| 59 |
)
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
if __name__ == "__main__":
|
| 63 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
+
|
|
|
|
|
|
|
| 5 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 6 |
|
| 7 |
|
|
|
|
| 37 |
response += token
|
| 38 |
yield response
|
| 39 |
|
| 40 |
+
|
| 41 |
+
chatbot = gr.ChatInterface(
|
|
|
|
|
|
|
| 42 |
respond,
|
| 43 |
additional_inputs=[
|
| 44 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
|
|
|
| 54 |
],
|
| 55 |
)
|
| 56 |
|
| 57 |
+
# Video editing
|
| 58 |
+
cinema = gr.HTML("https://maxin-cn-cinemo.hf.space")
|
| 59 |
+
|
| 60 |
+
#Diffusion
|
| 61 |
+
stable-diffusion = gr.HTML("https://falln87-stable-diffusion-3.hf.space")
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
demo = gr.TabbedInterface([chatbot, stable-diffusion, cinema], ["Chat", "text2img", "pix2vid"])
|
| 66 |
|
| 67 |
if __name__ == "__main__":
|
| 68 |
demo.launch()
|