Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,8 @@ import spaces
|
|
8 |
import gradio as gr
|
9 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, TextIteratorStreamer
|
10 |
|
|
|
|
|
11 |
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
12 |
|
13 |
MODEL_ID = os.environ.get("MODEL_ID")
|
@@ -101,5 +103,28 @@ gr.ChatInterface(
|
|
101 |
gr.Slider(0, 2, 1.1, label="Repetition penalty"),
|
102 |
gr.Slider(0, 1, 0.95, label="Top P sampling"),
|
103 |
],
|
104 |
-
theme=gr.themes.Soft(primary_hue=COLOR)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
).queue().launch()
|
|
|
8 |
import gradio as gr
|
9 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, TextIteratorStreamer
|
10 |
|
11 |
+
from ui import css, PLACEHOLDER
|
12 |
+
|
13 |
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
14 |
|
15 |
MODEL_ID = os.environ.get("MODEL_ID")
|
|
|
103 |
gr.Slider(0, 2, 1.1, label="Repetition penalty"),
|
104 |
gr.Slider(0, 1, 0.95, label="Top P sampling"),
|
105 |
],
|
106 |
+
theme=gr.themes.Soft(primary_hue=COLOR).set(
|
107 |
+
background_fill_primary="#020417",
|
108 |
+
background_fill_secondary_dark="#020417",
|
109 |
+
body_background_fill_dark="#020417",
|
110 |
+
block_background_fill_dark="#020417",
|
111 |
+
block_border_width="1px",
|
112 |
+
block_title_background_fill_dark="#15172c",
|
113 |
+
input_background_fill_dark="#15172c",
|
114 |
+
button_secondary_background_fill_dark="#15172c",
|
115 |
+
border_color_accent_dark="#15172c",
|
116 |
+
border_color_primary_dark="#15172c",
|
117 |
+
color_accent_soft_dark="#10132c",
|
118 |
+
code_background_fill_dark="#15172c",
|
119 |
+
),
|
120 |
+
css=css,
|
121 |
+
retry_btn="Retry",
|
122 |
+
undo_btn="Undo",
|
123 |
+
clear_btn="Clear",
|
124 |
+
submit_btn="Send",
|
125 |
+
chatbot=gr.Chatbot(
|
126 |
+
scale=1,
|
127 |
+
placeholder=PLACEHOLDER,
|
128 |
+
show_copy_button=True
|
129 |
+
)
|
130 |
).queue().launch()
|