Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,11 @@ import gradio as gr
|
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
"""
|
5 |
-
|
|
|
6 |
"""
|
7 |
-
|
|
|
8 |
|
9 |
|
10 |
def respond(
|
@@ -41,7 +43,8 @@ def respond(
|
|
41 |
|
42 |
|
43 |
"""
|
44 |
-
|
|
|
45 |
"""
|
46 |
demo = gr.ChatInterface(
|
47 |
respond,
|
@@ -61,4 +64,4 @@ demo = gr.ChatInterface(
|
|
61 |
|
62 |
|
63 |
if __name__ == "__main__":
|
64 |
-
demo.launch()
|
|
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
"""
|
5 |
+
Para m谩s informaci贸n sobre la API de inferencia de Hugging Face, consulta la documentaci贸n:
|
6 |
+
https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
7 |
"""
|
8 |
+
# Cambiar al modelo ALIA-40b
|
9 |
+
client = InferenceClient("BSC-LT/ALIA-40b")
|
10 |
|
11 |
|
12 |
def respond(
|
|
|
43 |
|
44 |
|
45 |
"""
|
46 |
+
Personaliza la interfaz de chat seg煤n la documentaci贸n de Gradio:
|
47 |
+
https://www.gradio.app/docs/chatinterface
|
48 |
"""
|
49 |
demo = gr.ChatInterface(
|
50 |
respond,
|
|
|
64 |
|
65 |
|
66 |
if __name__ == "__main__":
|
67 |
+
demo.launch()
|