Spaces:
Runtime error
Runtime error
charSLee013 commited on
Commit ·
1535508
1
Parent(s): d3e6b6b
fix bugs
Browse files
README.md
CHANGED
|
@@ -29,9 +29,4 @@ This Space requires you to sign in with your Hugging Face account to access the
|
|
| 29 |
- 🎨 Line Art Conversion
|
| 30 |
- 🖼️ Image Outpainting
|
| 31 |
- 🎭 Anime to Real Conversion
|
| 32 |
-
- 🎨 Real to Anime Conversion
|
| 33 |
-
|
| 34 |
-
## Usage
|
| 35 |
-
1. Click "Sign in with Hugging Face" button
|
| 36 |
-
2. Authorize the application with your HF account
|
| 37 |
-
3. Access all AI features after successful authentication
|
|
|
|
| 29 |
- 🎨 Line Art Conversion
|
| 30 |
- 🖼️ Image Outpainting
|
| 31 |
- 🎭 Anime to Real Conversion
|
| 32 |
+
- 🎨 Real to Anime Conversion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.py
CHANGED
|
@@ -2419,7 +2419,7 @@ except Exception as _e:
|
|
| 2419 |
|
| 2420 |
if __name__ == "__main__":
|
| 2421 |
# Setup server configuration
|
| 2422 |
-
SERVER_NAME_CONFIG =
|
| 2423 |
SERVER_PORT_CONFIG = CONFIG.SERVER_PORT
|
| 2424 |
SHARE_CONFIG = CONFIG.ENABLE_SHARE
|
| 2425 |
|
|
@@ -2438,6 +2438,10 @@ if __name__ == "__main__":
|
|
| 2438 |
print("🔒 Debug mode: disabled")
|
| 2439 |
|
| 2440 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2441 |
demo.launch(
|
| 2442 |
server_name=SERVER_NAME_CONFIG,
|
| 2443 |
server_port=SERVER_PORT_CONFIG,
|
|
|
|
| 2419 |
|
| 2420 |
if __name__ == "__main__":
|
| 2421 |
# Setup server configuration
|
| 2422 |
+
SERVER_NAME_CONFIG = CONFIG.SERVER_HOST
|
| 2423 |
SERVER_PORT_CONFIG = CONFIG.SERVER_PORT
|
| 2424 |
SHARE_CONFIG = CONFIG.ENABLE_SHARE
|
| 2425 |
|
|
|
|
| 2438 |
print("🔒 Debug mode: disabled")
|
| 2439 |
|
| 2440 |
try:
|
| 2441 |
+
demo.queue(
|
| 2442 |
+
max_size=100, # 最大队列长度
|
| 2443 |
+
default_concurrency_limit=1, # 默认并发限制
|
| 2444 |
+
)
|
| 2445 |
demo.launch(
|
| 2446 |
server_name=SERVER_NAME_CONFIG,
|
| 2447 |
server_port=SERVER_PORT_CONFIG,
|
config.py
CHANGED
|
@@ -38,8 +38,9 @@ class AppConfig(BaseModel):
|
|
| 38 |
APP_DESCRIPTION: str = Field(default="Robust AI image generation with clean state management", description="App description")
|
| 39 |
|
| 40 |
# Server Configuration
|
|
|
|
| 41 |
SERVER_PORT: int = Field(default=int(os.getenv("SERVER_PORT", "7860")), description="Server port")
|
| 42 |
-
ENABLE_SHARE: bool = Field(default=os.getenv("ENABLE_SHARE", "false").lower() == "true", description="Enable Gradio sharing")
|
| 43 |
|
| 44 |
|
| 45 |
|
|
|
|
| 38 |
APP_DESCRIPTION: str = Field(default="Robust AI image generation with clean state management", description="App description")
|
| 39 |
|
| 40 |
# Server Configuration
|
| 41 |
+
SERVER_HOST: str = Field(default=os.getenv("SERVER_HOST", "127.0.0.1"), description="Server bind address")
|
| 42 |
SERVER_PORT: int = Field(default=int(os.getenv("SERVER_PORT", "7860")), description="Server port")
|
| 43 |
+
ENABLE_SHARE: bool = Field(default=os.getenv("ENABLE_SHARE", "false").lower() == "true", description="Enable Gradio public sharing")
|
| 44 |
|
| 45 |
|
| 46 |
|