Follow these steps to set up and run the project in your local development environment.
In case you want to edit frontend (JavaScript/CSS/HTML), install the following additionally:
Clone the repository:
git clone https://github.com/Onyx-Nostalgia/youtamp.git
cd youtamp-
Create your environment file: Copy the example environment file to create your own local configuration.
cp .env.example .env
-
Configure Environment Variables: Open the
.envfile and add yourGEMINI_API_KEY. See the Environment Variables (.env) section below for more details on all available options. -
Start the Flask development server:
uv run app.py
-
Open the browser: Navigate to http://127.0.0.1:45334/
-
(Optional) For Frontend Development: If you need to edit CSS files, run the following command in a separate terminal. It will watch for changes in
static/css/input.cssand rebuild automatically.npm run dev.build:css
The .env file is used to configure the application. Below is a description of each variable found in the .env.example file.
| Variable | Description | Default |
|---|---|---|
GEMINI_API_KEY |
(Required) Your API key for the Gemini service. You can get one from Google AI Studio. | "" |
LOG_LEVEL |
Sets the application's logging verbosity. | INFO |
MOCK_FILE |
For frontend testing. If a path to a text file is provided (e.g., artifacts/video_id/timestamps.txt), the app will return the content of that file instead of calling the Gemini API. |
"" |
HTML_FILE |
Specifies which HTML file in the templates/ directory to render. |
index.html |
SAVE_PROMPT |
If true, saves the generated prompt to a file in the artifacts/ directory for debugging. |
false |
SAVE_RESPONSE |
If true, saves the raw response from the Gemini API to a file in the artifacts/ directory. |
false |
LOAD_PROMPT |
If true, loads a previously saved prompt from the artifacts/ directory, bypassing transcript fetching. Useful for quickly re-running a prompt. |
false |
Note
If you have GEMINI_API_KEY already configured as a system-wide environment variable (e.g., in your .zshrc or .bashrc), you do not need to set it again in the .env file, as the application will automatically use the existing key.
Frontend base on DaisyUI and TailwindCSS framework.
- Edit files in the
static/directory- JavaScript files:
static/app.js - CSS files:
static/css/input.css - if you want to add new files, just create them in the
static/folder
- JavaScript files:
- Edit
template/index.htmlfor HTML structure. - Refresh your browser to see changes.
We use Ruff to maintain code quality and a consistent style.
Check for issues: The following commands will report any issues without modifying files.
# Check for formatting issues
uvx ruff format --check .
# Check for linting errors
uvx ruff check .
# Check for type errors
uvx --with pydantic --with flask mypy .Apply fixes: The following commands will automatically format the code and fix any fixable linting issues (like removing unused imports).
# Automatically format all files
uvx ruff format .
# Automatically fix linting issues
uvx ruff check . --extend-fixable F401 --fixNote
While Ruff can fix many issues automatically, some may require manual changes.
.png)
.png)
.png)
.png)