Commit ·
c436ae1
1
Parent(s): e983b7d
Tokenizer error
Browse files- main.py +2 -4
- pyproject.toml +1 -0
- requirements.txt +1 -0
- src/backend/ui.py +1 -1
main.py
CHANGED
|
@@ -4,9 +4,7 @@ All orchestration lives in src/backend; this file only builds and launches the
|
|
| 4 |
app. HF Space `app_file` points here.
|
| 5 |
"""
|
| 6 |
|
| 7 |
-
from src.backend.ui import build_blocks
|
| 8 |
|
| 9 |
demo = build_blocks()
|
| 10 |
-
|
| 11 |
-
if __name__ == "__main__":
|
| 12 |
-
demo.queue().launch(show_error=True)
|
|
|
|
| 4 |
app. HF Space `app_file` points here.
|
| 5 |
"""
|
| 6 |
|
| 7 |
+
from src.backend.ui import CUSTOM_CSS, SAGE_THEME, build_blocks
|
| 8 |
|
| 9 |
demo = build_blocks()
|
| 10 |
+
demo.launch(show_error=True, theme=SAGE_THEME, css=CUSTOM_CSS)
|
|
|
|
|
|
pyproject.toml
CHANGED
|
@@ -10,6 +10,7 @@ dependencies = [
|
|
| 10 |
"torch",
|
| 11 |
"transformers",
|
| 12 |
"sentence-transformers",
|
|
|
|
| 13 |
"accelerate",
|
| 14 |
"huggingface_hub>=0.24",
|
| 15 |
"faiss-cpu",
|
|
|
|
| 10 |
"torch",
|
| 11 |
"transformers",
|
| 12 |
"sentence-transformers",
|
| 13 |
+
"sentencepiece",
|
| 14 |
"accelerate",
|
| 15 |
"huggingface_hub>=0.24",
|
| 16 |
"faiss-cpu",
|
requirements.txt
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
transformers
|
| 2 |
sentence-transformers
|
|
|
|
| 3 |
accelerate
|
| 4 |
faiss-cpu
|
| 5 |
numpy
|
|
|
|
| 1 |
transformers
|
| 2 |
sentence-transformers
|
| 3 |
+
sentencepiece
|
| 4 |
accelerate
|
| 5 |
faiss-cpu
|
| 6 |
numpy
|
src/backend/ui.py
CHANGED
|
@@ -94,7 +94,7 @@ def _chat_api(messages: list[dict], lang: str = "en") -> dict:
|
|
| 94 |
|
| 95 |
def build_blocks() -> gr.Blocks:
|
| 96 |
"""Build the sage-themed chat UI (mounted at the site root)."""
|
| 97 |
-
with gr.Blocks(title="Pay Equity for EU"
|
| 98 |
gr.HTML(_HERO)
|
| 99 |
lang = gr.Dropdown(
|
| 100 |
choices=[("English", "en"), ("Dansk", "da"), ("Français", "fr")],
|
|
|
|
| 94 |
|
| 95 |
def build_blocks() -> gr.Blocks:
|
| 96 |
"""Build the sage-themed chat UI (mounted at the site root)."""
|
| 97 |
+
with gr.Blocks(title="Pay Equity for EU") as demo:
|
| 98 |
gr.HTML(_HERO)
|
| 99 |
lang = gr.Dropdown(
|
| 100 |
choices=[("English", "en"), ("Dansk", "da"), ("Français", "fr")],
|