Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,15 @@ import subprocess
|
|
11 |
# Install flash-attn if not already installed
|
12 |
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
# Model and tokenizer for the chatbot
|
15 |
MODEL_ID1 = "microsoft/Phi-3.5-mini-instruct"
|
16 |
MODEL_LIST1 = ["microsoft/Phi-3.5-mini-instruct"]
|
@@ -150,8 +159,6 @@ def stream_vision(image, text_input=None, model_id="microsoft/Phi-3.5-vision-ins
|
|
150 |
|
151 |
return response
|
152 |
|
153 |
-
|
154 |
-
|
155 |
css = """
|
156 |
footer {
|
157 |
visibility: hidden;
|
@@ -240,7 +247,4 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css) as demo:
|
|
240 |
gr.HTML(footer)
|
241 |
|
242 |
# Launch the combined app
|
243 |
-
demo.launch(debug=True)
|
244 |
-
|
245 |
-
|
246 |
-
|
|
|
11 |
# Install flash-attn if not already installed
|
12 |
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
13 |
|
14 |
+
# Define placeholder and footer
|
15 |
+
PLACEHOLDER = "Send a message..."
|
16 |
+
|
17 |
+
footer = """
|
18 |
+
<div style="text-align: center; margin-top: 20px;">
|
19 |
+
<p>Powered by Phi-3.5 Models</p>
|
20 |
+
</div>
|
21 |
+
"""
|
22 |
+
|
23 |
# Model and tokenizer for the chatbot
|
24 |
MODEL_ID1 = "microsoft/Phi-3.5-mini-instruct"
|
25 |
MODEL_LIST1 = ["microsoft/Phi-3.5-mini-instruct"]
|
|
|
159 |
|
160 |
return response
|
161 |
|
|
|
|
|
162 |
css = """
|
163 |
footer {
|
164 |
visibility: hidden;
|
|
|
247 |
gr.HTML(footer)
|
248 |
|
249 |
# Launch the combined app
|
250 |
+
demo.launch(debug=True)
|
|
|
|
|
|