Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -59,17 +59,22 @@ def analyze_log(log_text):
|
|
59 |
def load_sample_log():
|
60 |
return SAMPLE_LOG
|
61 |
|
62 |
-
|
|
|
|
|
|
|
63 |
gr.Markdown("# Satellite Signal Log Analyzer")
|
64 |
-
gr.Markdown("Enter a satellite radio log
|
65 |
log_input = gr.Textbox(lines=5, label="Satellite Radio Log")
|
66 |
with gr.Row():
|
67 |
sample_button = gr.Button("Load Sample Log")
|
68 |
random_button = gr.Button("Generate Random Log")
|
|
|
69 |
output = gr.Textbox(label="Analysis Summary")
|
70 |
analyze_button = gr.Button("Analyze")
|
71 |
sample_button.click(fn=load_sample_log, outputs=log_input)
|
72 |
random_button.click(fn=generate_random_log, outputs=log_input)
|
|
|
73 |
analyze_button.click(fn=analyze_log, inputs=log_input, outputs=output)
|
74 |
|
75 |
interface.launch()
|
|
|
59 |
def load_sample_log():
|
60 |
return SAMPLE_LOG
|
61 |
|
62 |
+
def clear_log():
|
63 |
+
return ""
|
64 |
+
|
65 |
+
with gr.Blocks(theme="huggingface/dark") as interface:
|
66 |
gr.Markdown("# Satellite Signal Log Analyzer")
|
67 |
+
gr.Markdown("Enter, generate, or load a satellite radio log to detect issues, priorities, and details (including frequencies) using Llama 4 and Cerebras.")
|
68 |
log_input = gr.Textbox(lines=5, label="Satellite Radio Log")
|
69 |
with gr.Row():
|
70 |
sample_button = gr.Button("Load Sample Log")
|
71 |
random_button = gr.Button("Generate Random Log")
|
72 |
+
clear_button = gr.Button("Clear Log")
|
73 |
output = gr.Textbox(label="Analysis Summary")
|
74 |
analyze_button = gr.Button("Analyze")
|
75 |
sample_button.click(fn=load_sample_log, outputs=log_input)
|
76 |
random_button.click(fn=generate_random_log, outputs=log_input)
|
77 |
+
clear_button.click(fn=clear_log, outputs=log_input)
|
78 |
analyze_button.click(fn=analyze_log, inputs=log_input, outputs=output)
|
79 |
|
80 |
interface.launch()
|