Spaces:
Running
on
Zero
Running
on
Zero
fix: vars
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import os
|
2 |
import subprocess
|
3 |
from threading import Thread
|
4 |
|
@@ -23,9 +22,6 @@ MODEL_ID = "speakleash/Bielik-7B-Instruct-v0.1"
|
|
23 |
CHAT_TEMPLATE = "ChatML"
|
24 |
MODEL_NAME = MODEL_ID.split("/")[-1]
|
25 |
CONTEXT_LENGTH = 1024
|
26 |
-
COLOR = os.environ.get("COLOR")
|
27 |
-
EMOJI = os.environ.get("EMOJI")
|
28 |
-
DESCRIPTION = os.environ.get("DESCRIPTION")
|
29 |
|
30 |
# Load model
|
31 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
@@ -167,8 +163,8 @@ with gr.Blocks() as demo:
|
|
167 |
chat = gr.ChatInterface(
|
168 |
predict,
|
169 |
chatbot=chatbot,
|
170 |
-
title=
|
171 |
-
description=
|
172 |
examples=[["Kim jesteś?"], ["Ile to jest 9+2-1?"], ["Napisz mi coś miłego."]],
|
173 |
additional_inputs_accordion=gr.Accordion(
|
174 |
label="⚙️ Parameters", open=False, render=False
|
@@ -181,7 +177,7 @@ with gr.Blocks() as demo:
|
|
181 |
gr.Slider(0, 2, 1.1, label="Repetition penalty", render=False),
|
182 |
gr.Slider(0, 1, 0.95, label="Top P sampling", render=False),
|
183 |
],
|
184 |
-
theme=gr.themes.Soft(
|
185 |
)
|
186 |
demo.load(update_examples, None, chat.examples_handler.dataset)
|
187 |
|
|
|
|
|
1 |
import subprocess
|
2 |
from threading import Thread
|
3 |
|
|
|
22 |
CHAT_TEMPLATE = "ChatML"
|
23 |
MODEL_NAME = MODEL_ID.split("/")[-1]
|
24 |
CONTEXT_LENGTH = 1024
|
|
|
|
|
|
|
25 |
|
26 |
# Load model
|
27 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
163 |
chat = gr.ChatInterface(
|
164 |
predict,
|
165 |
chatbot=chatbot,
|
166 |
+
title="Online chat demo",
|
167 |
+
description="Opis testowy",
|
168 |
examples=[["Kim jesteś?"], ["Ile to jest 9+2-1?"], ["Napisz mi coś miłego."]],
|
169 |
additional_inputs_accordion=gr.Accordion(
|
170 |
label="⚙️ Parameters", open=False, render=False
|
|
|
177 |
gr.Slider(0, 2, 1.1, label="Repetition penalty", render=False),
|
178 |
gr.Slider(0, 1, 0.95, label="Top P sampling", render=False),
|
179 |
],
|
180 |
+
theme=gr.themes.Soft(),
|
181 |
)
|
182 |
demo.load(update_examples, None, chat.examples_handler.dataset)
|
183 |
|