charSLee013 commited on
Commit
d3e6b6b
·
1 Parent(s): a4493b3
Files changed (3) hide show
  1. app.py +1 -7
  2. config.py +1 -4
  3. requirements.txt +3 -4
app.py CHANGED
@@ -2418,11 +2418,6 @@ except Exception as _e:
2418
  # ============================================================================
2419
 
2420
  if __name__ == "__main__":
2421
- # Setup authentication if configured
2422
- AUTH_CONFIG = None
2423
- if CONFIG.ENABLE_AUTH:
2424
- AUTH_CONFIG = (CONFIG.AUTH_USERNAME, CONFIG.AUTH_PASSWORD)
2425
-
2426
  # Setup server configuration
2427
  SERVER_NAME_CONFIG = "0.0.0.0" if CONFIG.ENABLE_SHARE else "127.0.0.1"
2428
  SERVER_PORT_CONFIG = CONFIG.SERVER_PORT
@@ -2449,8 +2444,7 @@ if __name__ == "__main__":
2449
  share=SHARE_CONFIG,
2450
  debug=False, # Force disable debug mode
2451
  show_error=False, # Hide error details for production
2452
- quiet=False, # Show basic launch info
2453
- auth=AUTH_CONFIG
2454
  )
2455
  except Exception as e:
2456
  print(f"❌ Launch failed: {e}")
 
2418
  # ============================================================================
2419
 
2420
  if __name__ == "__main__":
 
 
 
 
 
2421
  # Setup server configuration
2422
  SERVER_NAME_CONFIG = "0.0.0.0" if CONFIG.ENABLE_SHARE else "127.0.0.1"
2423
  SERVER_PORT_CONFIG = CONFIG.SERVER_PORT
 
2444
  share=SHARE_CONFIG,
2445
  debug=False, # Force disable debug mode
2446
  show_error=False, # Hide error details for production
2447
+ quiet=False # Show basic launch info
 
2448
  )
2449
  except Exception as e:
2450
  print(f"❌ Launch failed: {e}")
config.py CHANGED
@@ -41,10 +41,7 @@ class AppConfig(BaseModel):
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
- # Authentication Configuration
45
- ENABLE_AUTH: bool = Field(default=os.getenv("ENABLE_AUTH", "false").lower() == "true", description="Enable authentication")
46
- AUTH_USERNAME: str = Field(default=os.getenv("AUTH_USERNAME", "admin"), description="Authentication username")
47
- AUTH_PASSWORD: str = Field(default=os.getenv("AUTH_PASSWORD", "password"), description="Authentication password")
48
 
49
  # Logging Configuration
50
  LOG_LEVEL: str = Field(default="WARNING", description="Logging level")
 
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
 
46
  # Logging Configuration
47
  LOG_LEVEL: str = Field(default="WARNING", description="Logging level")
requirements.txt CHANGED
@@ -1,8 +1,7 @@
1
  # Gradio Frontend Requirements
2
- gradio[oauth]>=4.0.0
 
3
  httpx>=0.25.0
4
  Pillow>=9.0.0
5
  pydantic>=2.0.0
6
- python-dotenv>=1.0.0
7
- gradio==5.42.0
8
- gradio-client==1.11.1
 
1
  # Gradio Frontend Requirements
2
+ gradio[oauth]==5.42.0
3
+ gradio-client==1.11.1
4
  httpx>=0.25.0
5
  Pillow>=9.0.0
6
  pydantic>=2.0.0
7
+ python-dotenv>=1.0.0