Skip to content

Commit

Permalink
update requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
nwaughachukwuma committed Oct 30, 2024
1 parent bcdad53 commit 830f029
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
16 changes: 5 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
streamlit

fastapi
uvicorn
requests
httpx
asyncio

openai
anthropic

numpy==1.24.3
pandas

pyperclip
python-multipart
python-slugify
python-dotenv
pydub

ruff
asyncio
pyperclip

firebase-admin
google-auth
google-cloud-storage
google-api-python-client
google-generativeai
google-generativeai

ruff
2 changes: 1 addition & 1 deletion src/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from dotenv import load_dotenv

load_dotenv()
load_dotenv()
11 changes: 3 additions & 8 deletions src/utils/main_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import Dict, List

import streamlit as st
from fastapi import HTTPException
from pydantic import BaseModel
from slugify import slugify

Expand Down Expand Up @@ -66,7 +65,7 @@ async def generate_audiocast(request: GenerateAudioCastRequest):
summary = request.summary
category = request.category
if category not in content_categories:
raise HTTPException(status_code=400, detail="Invalid content category")
raise Exception("Invalid content category")

container = st.empty()

Expand All @@ -78,9 +77,7 @@ async def generate_audiocast(request: GenerateAudioCastRequest):
source_content = generate_source_content(category, summary)
print(f"audiocast source content: {source_content}")
if not source_content:
raise HTTPException(
status_code=500, detail="Failed to develop audiocast source content"
)
raise Exception("Failed to develop audiocast source content")

# STEP 2: Generate audio script
with container.container():
Expand All @@ -90,9 +87,7 @@ async def generate_audiocast(request: GenerateAudioCastRequest):
audio_script = audio_script_maker.create(provider="anthropic")
print(f"streamlined audio_script: {audio_script}")
if not audio_script:
raise HTTPException(
status_code=500, detail="Error while generating audio script"
)
raise Exception("Error while generating audio script")

# TODO: Ingest audio file to a storage service (e.g., GCS, S3) using a background service
# STEP 3: Generate audio from the audio script
Expand Down

0 comments on commit 830f029

Please sign in to comment.