Fix: Gradio 5.x theme/css belong in gr.Blocks(), not demo.launch()
Browse files
app.py
CHANGED
|
@@ -401,6 +401,8 @@ def verify_password(password, stored):
|
|
| 401 |
# ============================================================
|
| 402 |
with gr.Blocks(
|
| 403 |
title="Code Security Risk Analyzer",
|
|
|
|
|
|
|
| 404 |
) as demo:
|
| 405 |
gr.Markdown("""
|
| 406 |
# 🔒 AI-Powered Code Security Risk Analyzer
|
|
@@ -503,7 +505,4 @@ curl -X POST https://ayshajavd-code-security-analyzer.hf.space/call/get_json_rep
|
|
| 503 |
""")
|
| 504 |
|
| 505 |
if __name__ == "__main__":
|
| 506 |
-
demo.launch(
|
| 507 |
-
theme=gr.themes.Soft(),
|
| 508 |
-
css=".gradio-container { max-width: 1200px; margin: auto; }"
|
| 509 |
-
)
|
|
|
|
| 401 |
# ============================================================
|
| 402 |
with gr.Blocks(
|
| 403 |
title="Code Security Risk Analyzer",
|
| 404 |
+
theme=gr.themes.Soft(),
|
| 405 |
+
css=".gradio-container { max-width: 1200px; margin: auto; }",
|
| 406 |
) as demo:
|
| 407 |
gr.Markdown("""
|
| 408 |
# 🔒 AI-Powered Code Security Risk Analyzer
|
|
|
|
| 505 |
""")
|
| 506 |
|
| 507 |
if __name__ == "__main__":
|
| 508 |
+
demo.launch()
|
|
|
|
|
|
|
|
|