Łukasz commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,8 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
"""
|
| 7 |
-
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 8 |
-
|
| 9 |
|
| 10 |
def respond(
|
| 11 |
message,
|
|
@@ -39,9 +36,7 @@ def respond(
|
|
| 39 |
response += token
|
| 40 |
yield response
|
| 41 |
|
| 42 |
-
|
| 43 |
-
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 44 |
-
"""
|
| 45 |
demo = gr.ChatInterface(
|
| 46 |
respond,
|
| 47 |
additional_inputs=[
|
|
@@ -58,6 +53,5 @@ 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 |
+
# Ustawienie klienta Inference API dla modelu Aya 35B
|
| 5 |
+
client = InferenceClient("CohereForAI/aya-23-35B")
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
def respond(
|
| 8 |
message,
|
|
|
|
| 36 |
response += token
|
| 37 |
yield response
|
| 38 |
|
| 39 |
+
# Konfiguracja interfejsu Gradio
|
|
|
|
|
|
|
| 40 |
demo = gr.ChatInterface(
|
| 41 |
respond,
|
| 42 |
additional_inputs=[
|
|
|
|
| 53 |
],
|
| 54 |
)
|
| 55 |
|
|
|
|
| 56 |
if __name__ == "__main__":
|
| 57 |
demo.launch()
|