Skip to content

Commit 8461ef5

Browse files
author
Leon Sander
committed
moved files into src folder for clearer root
1 parent 3e0444d commit 8461ef5

13 files changed

Lines changed: 16 additions & 14 deletions

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Local Multimodal AI Chat integrates several AI models behind a single Streamlit
3434

3535
```mermaid
3636
flowchart TD
37-
U["User"] --> UI["Streamlit UI (app.py)"]
38-
UI -->|"record / upload audio"| W["Whisper ASR (audio_handler)"]
37+
U["User"] --> UI["Streamlit UI (src/app.py)"]
38+
UI -->|"record / upload audio"| W["Whisper ASR (src/audio_handler)"]
3939
W --> R["ChatAPIHandler router"]
4040
UI -->|"text / image / PDF / commands"| R
4141
UI -->|"upload PDF"| P["PDF handler: pypdfium2 + chunking"]
@@ -50,15 +50,17 @@ flowchart TD
5050

5151
**Module layout**
5252

53+
All Python source lives under `src/`.
54+
5355
| File | Responsibility |
5456
|------|----------------|
55-
| `app.py` | Streamlit UI, session state, orchestration |
56-
| `chat_api_handler.py` | Endpoint router (Ollama / OpenAI), text + image + RAG calls |
57-
| `vectordb_handler.py` | Chroma client + Ollama embeddings |
58-
| `pdf_handler.py` | PDF text extraction, chunking, indexing |
59-
| `audio_handler.py` | Whisper transcription (webm→wav via ffmpeg) |
60-
| `database_operations.py` | SQLite repositories (messages, settings) |
61-
| `utils.py` / `prompt_templates.py` / `html_templates.py` | Helpers, prompts, UI styling |
57+
| `src/app.py` | Streamlit UI, session state, orchestration |
58+
| `src/chat_api_handler.py` | Endpoint router (Ollama / OpenAI), text + image + RAG calls |
59+
| `src/vectordb_handler.py` | Chroma client + Ollama embeddings |
60+
| `src/pdf_handler.py` | PDF text extraction, chunking, indexing |
61+
| `src/audio_handler.py` | Whisper transcription (webm→wav via ffmpeg) |
62+
| `src/database_operations.py` | SQLite repositories (messages, settings) |
63+
| `src/utils.py` / `src/prompt_templates.py` / `src/html_templates.py` | Helpers, prompts, UI styling |
6264

6365
## Tech Stack
6466

@@ -105,8 +107,8 @@ Running Ollama inside Docker is slow on Windows (system calls are translated bet
105107
```
106108
4. **Run**:
107109
```bash
108-
python3 database_operations.py # initializes the SQLite database
109-
streamlit run app.py
110+
python3 src/database_operations.py # initializes the SQLite database
111+
streamlit run src/app.py
110112
```
111113
5. **Pull models** as described above.
112114

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
- "8501:8501"
1010
environment:
1111
- PYTHONUNBUFFERED=1
12-
command: /bin/sh -c "python3 database_operations.py && streamlit run app.py --server.fileWatcherType poll"
12+
command: /bin/sh -c "python3 src/database_operations.py && streamlit run src/app.py --server.fileWatcherType poll"
1313
depends_on:
1414
- ollama
1515

docker-compose_without_ollama.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ services:
1010
- "11434:11434"
1111
environment:
1212
- PYTHONUNBUFFERED=1
13-
command: /bin/sh -c "python3 database_operations.py && streamlit run app.py --server.fileWatcherType poll"
13+
command: /bin/sh -c "python3 src/database_operations.py && streamlit run src/app.py --server.fileWatcherType poll"

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ RUN pip install --upgrade pip
1010
RUN pip install --no-cache-dir -r requirements.txt
1111
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
1212
EXPOSE 8501
13-
CMD ["streamlit","run", "app.py"]
13+
CMD ["streamlit","run", "src/app.py"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)