uvpatel7271 commited on
Commit
03b82c2
·
1 Parent(s): 8b9f3b6

final fiexes

Browse files
Files changed (2) hide show
  1. README.md +12 -0
  2. server/app.py +4 -1
README.md CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  # OpenEnv Python Code Review Environment
2
 
3
  Production-ready hackathon submission for OpenEnv evaluation, deterministic validator runs, and Hugging Face Docker deployment.
@@ -78,6 +88,7 @@ Optional demo UI:
78
 
79
  ```bash
80
  set ENABLE_GRADIO_DEMO=true
 
81
  python -m uvicorn server.app:app --host 0.0.0.0 --port 8000
82
  ```
83
 
@@ -148,6 +159,7 @@ Recommended deployment steps:
148
  `HF_TOKEN`
149
  5. Set Space variables as needed:
150
  `API_BASE_URL`, `MODEL_NAME`, `ENABLE_GRADIO_DEMO=false`
 
151
  6. Confirm the app listens on port `8000`.
152
  7. Smoke-test:
153
  `/health`
 
1
+ ---
2
+ title: Python Code Review Environment Server
3
+ sdk: docker
4
+ app_port: 8000
5
+ base_path: /web
6
+ pinned: false
7
+ tags:
8
+ - openenv
9
+ ---
10
+
11
  # OpenEnv Python Code Review Environment
12
 
13
  Production-ready hackathon submission for OpenEnv evaluation, deterministic validator runs, and Hugging Face Docker deployment.
 
88
 
89
  ```bash
90
  set ENABLE_GRADIO_DEMO=true
91
+ set ENABLE_WEB_INTERFACE=true
92
  python -m uvicorn server.app:app --host 0.0.0.0 --port 8000
93
  ```
94
 
 
159
  `HF_TOKEN`
160
  5. Set Space variables as needed:
161
  `API_BASE_URL`, `MODEL_NAME`, `ENABLE_GRADIO_DEMO=false`
162
+ `ENABLE_WEB_INTERFACE=false` is also supported for OpenEnv-managed deploys.
163
  6. Confirm the app listens on port `8000`.
164
  7. Smoke-test:
165
  `/health`
server/app.py CHANGED
@@ -27,7 +27,10 @@ except ImportError:
27
 
28
 
29
  def _gradio_enabled() -> bool:
30
- return str(os.getenv("ENABLE_GRADIO_DEMO", "false")).strip().lower() in {"1", "true", "yes", "on"}
 
 
 
31
 
32
 
33
  def _max_concurrent_envs() -> int:
 
27
 
28
 
29
  def _gradio_enabled() -> bool:
30
+ for env_name in ("ENABLE_GRADIO_DEMO", "ENABLE_WEB_INTERFACE"):
31
+ if str(os.getenv(env_name, "")).strip().lower() in {"1", "true", "yes", "on"}:
32
+ return True
33
+ return False
34
 
35
 
36
  def _max_concurrent_envs() -> int: