Skip to content

Commit

Permalink
docs: Enhance project documentation and cleanup codebase
Browse files Browse the repository at this point in the history
- Added a Configuration section and example configuration file to README.md
- Improved README.md structure by removing unnecessary text
- Refactored main.py to remove redundant lines in install_config function
  • Loading branch information
johnnyhuy committed Apr 4, 2024
1 parent 5888fec commit fd713f2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,31 @@ graph TD

The application will transcribe each audio file in the input directory and save the transcriptions to the output directory. It will also generate summaries of the transcriptions using the configured models and save them to the output directory.

## :gear: Configuration

The application uses a configuration file (`.transcribe.yaml`) to specify settings such as input/output directories, API keys, models, and their configurations. The configuration file is created automatically when you run the `transcribe-me install` command.

Here is an example configuration file:

```yaml
openai:
models:
- temperature: 0.1
max_tokens: 2048
model: gpt-4
system_prompt: Generate a summary with key points in bold and a Next Steps section, use Markdown, be a concise tech expert but kind to non-technical readers.

anthropic:
models:
- temperature: 0.8
max_tokens: 2048
model: claude-3-sonnet-20240229
system_prompt: Generate something creative and interesting, use Markdown, be a concise tech expert but kind to non-technical readers.

input_folder: input
output_folder: output
```
## Additional Make Commands
- `freeze`: Saves the installed Python package versions to the `requirements.txt` file.
Expand Down
2 changes: 0 additions & 2 deletions transcribe_me/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,10 @@ def install_config():

if not OPENAI_API_KEY:
openai_key = input("Enter your OpenAI API key: ")
config["openai"]["api_key"] = openai_key
append_to_shell_profile(f"export OPENAI_API_KEY={openai_key}")

if not ANTHROPIC_API_KEY:
anthropic_key = input("Enter your Anthropic API key: ")
config["anthropic"]["api_key"] = anthropic_key
append_to_shell_profile(f"export ANTHROPIC_API_KEY={anthropic_key}")

with open(".transcribe.yaml", "w") as f:
Expand Down

0 comments on commit fd713f2

Please sign in to comment.