Spaces:
Sleeping
Sleeping
File size: 1,534 Bytes
472739a 3ab234f 472739a 3ab234f 472739a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | import os
from dotenv import load_dotenv
# Load environment variables from .env.local
load_dotenv(os.path.join(os.path.dirname(os.path.dirname(__file__)), ".env.local"))
# Model Configurations
SCRIPT_GENERATION_MODEL = "unsloth/Phi-4-mini-instruct-unsloth-bnb-4bit"
# User API Keys (Bring Your Own Key - BYOK)
# Users provide these through the settings interface or environment variables
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY", "")
INFERENCE_API_URL = os.getenv("INFERENCE_API_URL", "")
INFERENCE_API_KEY = os.getenv("INFERENCE_API_KEY", "")
# TTS API Settings (ElevenLabs)
ELEVENLABS_API_KEY = os.getenv("ELEVENLABS_API_KEY", "")
# ElevenLabs Voice IDs (you can change these to different voices)
# Find more voices at: https://api.elevenlabs.io/v1/voices
ELEVENLABS_HOST_VOICE = "ErXwobaYiN019PkySvjV" # Antoni - male voice for Host
ELEVENLABS_GUEST_VOICE = "EXAVITQu4vr4xnSDxMaL" # Bella - female voice for Guest
# Paths
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMP_DIR = os.path.join(BASE_DIR, "temp")
OUTPUT_DIR = os.path.join(BASE_DIR, "output")
# Ensure directories exist
os.makedirs(TEMP_DIR, exist_ok=True)
os.makedirs(OUTPUT_DIR, exist_ok=True)
# Generation Settings
MAX_TOKENS = 4096 # Supports long-form content generation
TEMPERATURE = 0.7
# Context Limits for Multi-Paper Processing
MAX_CONTEXT_CHARS = 80000 # Maximum total characters for multiple papers (~60K tokens)
# This ensures we stay well within the 128K token limit while leaving room for prompts and responses
|