Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
-
|
5 |
-
|
6 |
|
7 |
def respond(
|
8 |
message,
|
@@ -39,8 +39,7 @@ def respond(
|
|
39 |
|
40 |
yield response
|
41 |
|
42 |
-
|
43 |
-
# Launch the Gradio app with the external CSS file
|
44 |
demo = gr.ChatInterface(
|
45 |
respond,
|
46 |
additional_inputs=[
|
@@ -55,9 +54,8 @@ demo = gr.ChatInterface(
|
|
55 |
label="Top-p (nucleus sampling)",
|
56 |
),
|
57 |
],
|
58 |
-
css="styles.css", #
|
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("gpt-3.5-turbo")
|
6 |
|
7 |
def respond(
|
8 |
message,
|
|
|
39 |
|
40 |
yield response
|
41 |
|
42 |
+
# Запускаем Gradio интерфейс с новой моделью
|
|
|
43 |
demo = gr.ChatInterface(
|
44 |
respond,
|
45 |
additional_inputs=[
|
|
|
54 |
label="Top-p (nucleus sampling)",
|
55 |
),
|
56 |
],
|
57 |
+
css="styles.css", # Ссылка на внешний CSS файл
|
58 |
)
|
59 |
|
|
|
60 |
if __name__ == "__main__":
|
61 |
demo.launch()
|