Skip to content

Commit

Permalink
Merge pull request #12 from rajtilakjee/bug/apikey
Browse files Browse the repository at this point in the history
Modify main.py and installation.md docs
  • Loading branch information
rajtilakjee authored May 1, 2024
2 parents 5820a9c + ae268c6 commit d0216dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ These are the details you need to follow in order to make Simone work on your lo

1. Register at [OpenRouter](https://openrouter.ai/)
2. Get an API Key
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`.

## Installation

Expand Down
11 changes: 10 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import os
import sys
from typing import Annotated
from typing import Optional

Expand All @@ -18,7 +19,7 @@
load_dotenv()
api_key = os.getenv("GEMMA_API_KEY")

__version__ = "2.1.0"
__version__ = "2.1.1"


def version_callback(value: bool):
Expand Down Expand Up @@ -48,6 +49,14 @@ def main(
] = None,
):

if api_key:
print("GEMMA 7B API key found. Continuing execution...")
else:
print(
"Error: GEMMA 7B API key not found. Please obtain an API key from OpenRouter.ai before proceeding. Check the documentations if required.",
)
sys.exit(1)

print("Downloading audio and video...")
downloads = Downloader(f"{url}")
downloads.audio()
Expand Down

0 comments on commit d0216dc

Please sign in to comment.