Spaces:
Paused
Paused
Update environment example and Dockerfile health check
Browse files- Changed HF_TOKEN placeholder in env-example.txt for better clarity.
- Updated health check command in Dockerfile to verify server response correctly.
- Adjusted parameter name in app.py for audio generation to align with model requirements.
Files changed (2)
- Dockerfile+1-3
- app.py+2-2
55 unmodified lines5657585960616263646555 unmodified lines# Health check - verify Gradio server is responding# Extended start-period to allow model download and initializationHEALTHCHECK --interval=30s --timeout=15s --start-period=300s --retries=5 \CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/healthz')" 2>/dev/null || exit 1# Add a simple health endpoint for better monitoringRUN echo 'import os; os.system("python -c \"print(\\\"OK\\\")\" > /tmp/healthz.txt")' >> /app/health_check.py# Run the application with proper resource managementCMD ["python", "-u", "app.py"]55 unmodified lines565758596061626355 unmodified lines# Health check - verify Gradio server is responding# Extended start-period to allow model download and initializationHEALTHCHECK --interval=30s --timeout=15s --start-period=300s --retries=5 \CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/')" 2>/dev/null || exit 1# Run the application with proper resource managementCMD ["python", "-u", "app.py"]
135 unmodified lines136137138139140141142143144145146135 unmodified lines)except TypeError as e1:try:# Try alternative parameter nameoutput = pipeline(prompt=prompt,num_inference_steps=50,audio_length_in_s=audio_duration,guidance_scale=3.5, # Add guidance for better qualitygenerator=generator,)135 unmodified lines136137138139140141142143144145146135 unmodified lines)except TypeError as e1:try:# Try alternative parameter name (some models use 'duration' instead of 'audio_length_in_s')output = pipeline(prompt=prompt,num_inference_steps=50,duration=audio_duration,guidance_scale=3.5, # Add guidance for better qualitygenerator=generator,)
Dockerfile+1-3
app.py+2-2