Spaces:
Running on Zero
Running on Zero
File size: 2,035 Bytes
5388e06 f829d5a 5388e06 1b654ef 44ef774 1b654ef f829d5a 1b654ef dcf7200 44ef774 1b654ef 44ef774 1b654ef 44ef774 1b654ef 44ef774 5388e06 44ef774 5388e06 44ef774 5388e06 44ef774 1b654ef 44ef774 1b654ef 44ef774 1b654ef 44ef774 1b654ef 44ef774 1b654ef 44ef774 1b654ef 44ef774 1b654ef 44ef774 1b654ef 5388e06 1b654ef 44ef774 5388e06 44ef774 5388e06 44ef774 5388e06 1b654ef 44ef774 1b654ef 5388e06 1b654ef 44ef774 5388e06 1b654ef 44ef774 1b654ef 5388e06 1b654ef dcf7200 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | # =====================================================
# Apckeyl Framework
# Version 1.5
# app.py
# =====================================================
"""
Temporary Apckeyl Framework Test Interface.
Version 1.5
"""
import traceback
import gradio as gr
import spaces
from control_plane_test_report import (
generate_text_report,
)
# =====================================================
# Run Tests
# =====================================================
@spaces.GPU
def run_control_plane_tests():
try:
return generate_text_report()
except Exception as error:
output = []
output.append(
"============================================================"
)
output.append(
"APCKEYL FRAMEWORK"
)
output.append(
"CONTROL PLANE TEST ERROR"
)
output.append(
"============================================================"
)
output.append("")
output.append(
f"Error: {error}"
)
output.append("")
output.append(
traceback.format_exc()
)
return "\n".join(output)
# =====================================================
# Gradio Interface
# =====================================================
with gr.Blocks(
title="Apckeyl Framework Test"
) as demo:
gr.Markdown(
"""
# Apckeyl Framework
## Control Plane Test Runner
Version 1.5
Нажмите кнопку для запуска полного
тестового контура Framework.
"""
)
run_button = gr.Button(
"▶ Run Control Plane Tests"
)
result_box = gr.Textbox(
label="Test Result",
lines=30,
interactive=False,
)
run_button.click(
fn=run_control_plane_tests,
inputs=[],
outputs=result_box,
)
# =====================================================
# Launch
# =====================================================
demo.launch() |