fix: gradio6
Browse files- README.md +1 -1
- app.py +8 -4
- requirements.txt +1 -1
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🌐
|
|
| 4 |
colorFrom: gray
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
python_version: 3.12
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
|
|
|
| 4 |
colorFrom: gray
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 6.26.0
|
| 8 |
python_version: 3.12
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
app.py
CHANGED
|
@@ -359,19 +359,19 @@ CSS = """
|
|
| 359 |
footer { display: none !important; }
|
| 360 |
"""
|
| 361 |
|
|
|
|
|
|
|
| 362 |
|
| 363 |
with gr.Blocks(
|
| 364 |
title="K2 Horizon",
|
| 365 |
-
theme=gr.themes.Base(primary_hue="slate", neutral_hue="slate"),
|
| 366 |
-
css=CSS,
|
| 367 |
) as demo:
|
| 368 |
with gr.Column(elem_id="app-shell"):
|
| 369 |
gr.Markdown("# K2 Horizon", elem_id="title")
|
| 370 |
gr.Markdown("Private CPU inference with optional web tools", elem_id="subtitle")
|
| 371 |
chatbot = gr.Chatbot(
|
| 372 |
-
type="messages",
|
| 373 |
height=570,
|
| 374 |
-
|
|
|
|
| 375 |
placeholder="Ask anything",
|
| 376 |
elem_id="chat",
|
| 377 |
)
|
|
@@ -401,4 +401,8 @@ if __name__ == "__main__":
|
|
| 401 |
server_port=env_int("GRADIO_SERVER_PORT", 7860),
|
| 402 |
share=os.getenv("GRADIO_SHARE", "0") == "1",
|
| 403 |
show_error=True,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
)
|
|
|
|
| 359 |
footer { display: none !important; }
|
| 360 |
"""
|
| 361 |
|
| 362 |
+
THEME = gr.themes.Base(primary_hue="slate", neutral_hue="slate")
|
| 363 |
+
|
| 364 |
|
| 365 |
with gr.Blocks(
|
| 366 |
title="K2 Horizon",
|
|
|
|
|
|
|
| 367 |
) as demo:
|
| 368 |
with gr.Column(elem_id="app-shell"):
|
| 369 |
gr.Markdown("# K2 Horizon", elem_id="title")
|
| 370 |
gr.Markdown("Private CPU inference with optional web tools", elem_id="subtitle")
|
| 371 |
chatbot = gr.Chatbot(
|
|
|
|
| 372 |
height=570,
|
| 373 |
+
buttons=["copy"],
|
| 374 |
+
allow_tags=False,
|
| 375 |
placeholder="Ask anything",
|
| 376 |
elem_id="chat",
|
| 377 |
)
|
|
|
|
| 401 |
server_port=env_int("GRADIO_SERVER_PORT", 7860),
|
| 402 |
share=os.getenv("GRADIO_SHARE", "0") == "1",
|
| 403 |
show_error=True,
|
| 404 |
+
ssr_mode=False,
|
| 405 |
+
footer_links=[],
|
| 406 |
+
theme=THEME,
|
| 407 |
+
css=CSS,
|
| 408 |
)
|
requirements.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 2 |
-
gradio==
|
| 3 |
huggingface-hub>=0.31.2
|
| 4 |
llama-cpp-python==0.3.35
|
| 5 |
smolagents==1.26.0
|
|
|
|
| 1 |
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 2 |
+
gradio==6.26.0
|
| 3 |
huggingface-hub>=0.31.2
|
| 4 |
llama-cpp-python==0.3.35
|
| 5 |
smolagents==1.26.0
|