Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -39,13 +39,13 @@ DEFAULT_SELECTION = "HuggingFaceTB/SmolVLM2"
|
|
39 |
|
40 |
TRUNCATION_WARNING = """**⚠️ Warning:** The input data (code and/or prior analysis) was too long for the AI model's context limit and had to be truncated. The analysis below may be incomplete or based on partial information.\n\n---\n\n"""
|
41 |
|
42 |
-
ERROR_503_USER_MESSAGE = """
|
43 |
|
44 |
You have a few options:
|
45 |
|
46 |
* **Wait & Retry:** Try clicking "Get Space Report" again in ~3-5 minutes. Endpoints often scale down to save resources and take a short time to wake up.
|
47 |
* **Select Cached Report:** Use the dropdown above to view a report for a Space that has already been analyzed.
|
48 |
-
* **Request Analysis:** If the error persists, please open an issue or discussion in the Space's Community tab requesting analysis for your target Space ID. We can run the job manually when the endpoint is available.
|
49 |
"""
|
50 |
|
51 |
|
@@ -266,7 +266,7 @@ def _run_live_analysis(space_id: str, progress=gr.Progress(track_tqdm=True)):
|
|
266 |
if status == 'scaledToZero':
|
267 |
logging.info(f"Endpoint '{ENDPOINT_NAME}' is scaled to zero. Attempting to resume...")
|
268 |
endpoint.resume()
|
269 |
-
msg_503 = f"The status of the Qwen2.5-Coder-32B-Instruct endpoint powering the analysis is currently: {status}\n\n" + ERROR_503_USER_MESSAGE
|
270 |
yield (
|
271 |
gr.update(value=msg_503, visible=True),
|
272 |
gr.update(value="", visible=False),
|
@@ -497,7 +497,7 @@ Use the dropdown menu below to explore the [reports generated for some popular S
|
|
497 |
|
498 |
*Please note the following limitations:*
|
499 |
- *The model may easily miss important details in the code, especially when it leverages docker files or external libraries.*
|
500 |
-
- *This app uses the base Qwen Coder model without specific adaptation to the task. We'd love to discuss how to improve this, if you want to participate feel free to open a discussion
|
501 |
"""
|
502 |
|
503 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
|
39 |
|
40 |
TRUNCATION_WARNING = """**⚠️ Warning:** The input data (code and/or prior analysis) was too long for the AI model's context limit and had to be truncated. The analysis below may be incomplete or based on partial information.\n\n---\n\n"""
|
41 |
|
42 |
+
ERROR_503_USER_MESSAGE = """It appears that the analysis model endpoint is currently down or starting up.
|
43 |
|
44 |
You have a few options:
|
45 |
|
46 |
* **Wait & Retry:** Try clicking "Get Space Report" again in ~3-5 minutes. Endpoints often scale down to save resources and take a short time to wake up.
|
47 |
* **Select Cached Report:** Use the dropdown above to view a report for a Space that has already been analyzed.
|
48 |
+
* **Request Analysis:** If the error persists, please [open an issue or discussion](https://huggingface.co/spaces/yjernite/space-privacy/discussions) in the Space's Community tab requesting analysis for your target Space ID. We can run the job manually when the endpoint is available.
|
49 |
"""
|
50 |
|
51 |
|
|
|
266 |
if status == 'scaledToZero':
|
267 |
logging.info(f"Endpoint '{ENDPOINT_NAME}' is scaled to zero. Attempting to resume...")
|
268 |
endpoint.resume()
|
269 |
+
msg_503 = f"**Full Service Temporarily Unavailable**: but you can **browse existing reports** or **check back later!**\n\n The status of the Qwen2.5-Coder-32B-Instruct endpoint powering the analysis is currently: '{status}'\n\n" + ERROR_503_USER_MESSAGE
|
270 |
yield (
|
271 |
gr.update(value=msg_503, visible=True),
|
272 |
gr.update(value="", visible=False),
|
|
|
497 |
|
498 |
*Please note the following limitations:*
|
499 |
- *The model may easily miss important details in the code, especially when it leverages docker files or external libraries.*
|
500 |
+
- *This app uses the base Qwen Coder model without specific adaptation to the task. We'd love to discuss how to improve this, if you want to participate [feel free to open a discussion!](https://huggingface.co/spaces/yjernite/space-privacy/discussions)*
|
501 |
"""
|
502 |
|
503 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|