Spaces:
Sleeping
Sleeping
feat: HuggingFace Spaces deployment configuration
Browse filesAdd README with HF frontmatter, update Dockerfile to include data,
fix theme/css on gr.Blocks, add python-dotenv to deps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- .gitignore +2 -1
- Dockerfile +15 -0
- README.md +15 -0
- app.py +2 -2
- data/bm25_index.pkl +3 -0
- data/chromadb/3f65f040-5fca-4ea9-b1c2-377ecbadbdb9/data_level0.bin +3 -0
- data/chromadb/3f65f040-5fca-4ea9-b1c2-377ecbadbdb9/header.bin +3 -0
- data/chromadb/3f65f040-5fca-4ea9-b1c2-377ecbadbdb9/length.bin +3 -0
- data/chromadb/3f65f040-5fca-4ea9-b1c2-377ecbadbdb9/link_lists.bin +0 -0
- data/chromadb/chroma.sqlite3 +3 -0
- pyproject.toml +1 -0
.gitignore
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
.env
|
| 2 |
-
data/
|
|
|
|
| 3 |
__pycache__/
|
| 4 |
*.pyc
|
| 5 |
.pytest_cache/
|
|
|
|
| 1 |
.env
|
| 2 |
+
data/ingest_cache/
|
| 3 |
+
data/enrichments/
|
| 4 |
__pycache__/
|
| 5 |
*.pyc
|
| 6 |
.pytest_cache/
|
Dockerfile
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
COPY pyproject.toml .
|
| 6 |
+
RUN pip install --no-cache-dir .
|
| 7 |
+
|
| 8 |
+
COPY src/ src/
|
| 9 |
+
COPY app.py .
|
| 10 |
+
COPY data/chromadb/ data/chromadb/
|
| 11 |
+
COPY data/bm25_index.pkl data/bm25_index.pkl
|
| 12 |
+
|
| 13 |
+
EXPOSE 7860
|
| 14 |
+
|
| 15 |
+
CMD ["python", "app.py"]
|
README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: MediaStorm Archive Explorer
|
| 3 |
+
emoji: 🎬
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: blue
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
+
pinned: false
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# MediaStorm Archive Explorer
|
| 12 |
+
|
| 13 |
+
Semantic search across 20 years of MediaStorm documentary archives (350+ stories).
|
| 14 |
+
|
| 15 |
+
Hybrid retrieval (dense + BM25 + RRF + reranking) powered by Gemini Flash.
|
app.py
CHANGED
|
@@ -293,7 +293,7 @@ HEADER_HTML = """
|
|
| 293 |
</div>
|
| 294 |
"""
|
| 295 |
|
| 296 |
-
with gr.Blocks(title="MediaStorm Archive Explorer") as demo:
|
| 297 |
gr.HTML(HEADER_HTML)
|
| 298 |
|
| 299 |
with gr.Accordion("Filters", open=False):
|
|
@@ -321,4 +321,4 @@ with gr.Blocks(title="MediaStorm Archive Explorer") as demo:
|
|
| 321 |
)
|
| 322 |
|
| 323 |
if __name__ == "__main__":
|
| 324 |
-
demo.launch(server_name="0.0.0.0", server_port=7860
|
|
|
|
| 293 |
</div>
|
| 294 |
"""
|
| 295 |
|
| 296 |
+
with gr.Blocks(title="MediaStorm Archive Explorer", theme=theme, css=CSS) as demo:
|
| 297 |
gr.HTML(HEADER_HTML)
|
| 298 |
|
| 299 |
with gr.Accordion("Filters", open=False):
|
|
|
|
| 321 |
)
|
| 322 |
|
| 323 |
if __name__ == "__main__":
|
| 324 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|
data/bm25_index.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:07924a1b2467267887630f3471e738c5a10728f8cfcaac636329aa3c23e89019
|
| 3 |
+
size 1034297
|
data/chromadb/3f65f040-5fca-4ea9-b1c2-377ecbadbdb9/data_level0.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5eadd5aa46e3c3a653a750232895e73de40df0da8317490910ea804e4ca85205
|
| 3 |
+
size 423600
|
data/chromadb/3f65f040-5fca-4ea9-b1c2-377ecbadbdb9/header.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf12d4486518c7addf488cb4854526902c78e91951990e1e2f4e055cec814e5d
|
| 3 |
+
size 100
|
data/chromadb/3f65f040-5fca-4ea9-b1c2-377ecbadbdb9/length.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7a12e561363385e9dfeeab326368731c030ed4b374e7f5897ac819159d2884c5
|
| 3 |
+
size 400
|
data/chromadb/3f65f040-5fca-4ea9-b1c2-377ecbadbdb9/link_lists.bin
ADDED
|
File without changes
|
data/chromadb/chroma.sqlite3
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:afcc14d1c997563e899e8c52f100d8a183352e36397d1e1434a71d7a82c2be0c
|
| 3 |
+
size 9138176
|
pyproject.toml
CHANGED
|
@@ -15,6 +15,7 @@ dependencies = [
|
|
| 15 |
"click>=8.0.0",
|
| 16 |
"rank-bm25>=0.2.2",
|
| 17 |
"PyStemmer>=2.2.0",
|
|
|
|
| 18 |
]
|
| 19 |
|
| 20 |
[project.optional-dependencies]
|
|
|
|
| 15 |
"click>=8.0.0",
|
| 16 |
"rank-bm25>=0.2.2",
|
| 17 |
"PyStemmer>=2.2.0",
|
| 18 |
+
"python-dotenv>=1.0.0",
|
| 19 |
]
|
| 20 |
|
| 21 |
[project.optional-dependencies]
|