Spaces:
Runtime error
Runtime error
File size: 440 Bytes
99c6372 835cf43 2dbd756 835cf43 99c6372 835cf43 99c6372 9443fb7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import os
import sys
# Ensure the repository is in the Python path
repo_path = os.path.join(os.getcwd(), "stable-diffusion-webui-forge")
sys.path.insert(0, repo_path)
try:
from launch import demo
except ImportError:
raise ImportError("Could not import 'demo' from launch.py. Please check if the repository exposes a Gradio interface.")
port = int(os.environ.get("PORT", 7860))
app.launch(server_name="0.0.0.0", server_port=port)
|