Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -397,27 +397,46 @@ with gr.Blocks(
|
|
| 397 |
""")
|
| 398 |
|
| 399 |
with gr.Row():
|
| 400 |
-
with gr.Column(scale=1):
|
| 401 |
-
code_input = gr.Code(
|
| 402 |
-
label="Paste Your Code Here", language="python", lines=20)
|
| 403 |
-
with gr.Row():
|
| 404 |
-
analyze_btn = gr.Button("π Analyze Security", variant="primary", size="lg")
|
| 405 |
-
json_btn = gr.Button("π JSON Report", variant="secondary", size="lg")
|
| 406 |
-
with gr.Column(scale=1):
|
| 407 |
-
report_output = gr.Markdown(label="Security Report")
|
| 408 |
-
|
| 409 |
-
download_btn = gr.Button(
|
| 410 |
-
"π Generate PDF Report"
|
| 411 |
-
)
|
| 412 |
|
| 413 |
-
|
| 414 |
-
label="Download Report"
|
| 415 |
-
)
|
| 416 |
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 421 |
|
| 422 |
gr.Examples(examples=EXAMPLES, inputs=[code_input], label="Example Code Snippets")
|
| 423 |
|
|
|
|
| 397 |
""")
|
| 398 |
|
| 399 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 400 |
|
| 401 |
+
with gr.Column(scale=1):
|
|
|
|
|
|
|
| 402 |
|
| 403 |
+
code_input = gr.Code(
|
| 404 |
+
label="Paste Your Code Here",
|
| 405 |
+
language="python",
|
| 406 |
+
lines=20
|
| 407 |
+
)
|
| 408 |
+
|
| 409 |
+
with gr.Row():
|
| 410 |
+
analyze_btn = gr.Button(
|
| 411 |
+
"π Analyze Security",
|
| 412 |
+
variant="primary",
|
| 413 |
+
size="lg"
|
| 414 |
+
)
|
| 415 |
+
|
| 416 |
+
json_btn = gr.Button(
|
| 417 |
+
"π JSON Report",
|
| 418 |
+
variant="secondary",
|
| 419 |
+
size="lg"
|
| 420 |
+
)
|
| 421 |
+
|
| 422 |
+
with gr.Column(scale=1):
|
| 423 |
+
|
| 424 |
+
report_output = gr.Markdown(
|
| 425 |
+
label="Security Report"
|
| 426 |
+
)
|
| 427 |
+
|
| 428 |
+
download_btn = gr.Button(
|
| 429 |
+
"π Generate PDF Report"
|
| 430 |
+
)
|
| 431 |
+
|
| 432 |
+
pdf_file = gr.File(
|
| 433 |
+
label="Download Report"
|
| 434 |
+
)
|
| 435 |
+
|
| 436 |
+
json_output = gr.JSON(
|
| 437 |
+
label="JSON Report",
|
| 438 |
+
visible=False
|
| 439 |
+
)
|
| 440 |
|
| 441 |
gr.Examples(examples=EXAMPLES, inputs=[code_input], label="Example Code Snippets")
|
| 442 |
|