Skip to content

Commit d0216dc

Browse files
authored
Merge pull request #12 from rajtilakjee/bug/apikey
Modify main.py and installation.md docs
2 parents 5820a9c + ae268c6 commit d0216dc

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docs/getting-started/installation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ These are the details you need to follow in order to make Simone work on your lo
1818

1919
1. Register at [OpenRouter](https://openrouter.ai/)
2020
2. Get an API Key
21+
3. Upload the API key in a file called `.env` at the root of the project. A sample `.env` file is given as `sample.env`, you can upload your API key in this file and rename it to `.env`.
2122

2223
## Installation
2324

src/main.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import os
4+
import sys
45
from typing import Annotated
56
from typing import Optional
67

@@ -18,7 +19,7 @@
1819
load_dotenv()
1920
api_key = os.getenv("GEMMA_API_KEY")
2021

21-
__version__ = "2.1.0"
22+
__version__ = "2.1.1"
2223

2324

2425
def version_callback(value: bool):
@@ -48,6 +49,14 @@ def main(
4849
] = None,
4950
):
5051

52+
if api_key:
53+
print("GEMMA 7B API key found. Continuing execution...")
54+
else:
55+
print(
56+
"Error: GEMMA 7B API key not found. Please obtain an API key from OpenRouter.ai before proceeding. Check the documentations if required.",
57+
)
58+
sys.exit(1)
59+
5160
print("Downloading audio and video...")
5261
downloads = Downloader(f"{url}")
5362
downloads.audio()

0 commit comments

Comments
 (0)