Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,11 +9,11 @@ headers = {
|
|
9 |
"Content-Type": "application/json"
|
10 |
}
|
11 |
|
12 |
-
#
|
13 |
SAMPLE_LOG = """
|
14 |
-
2025-04-12 10:01 UTC | 40.7N, 74.0W | Signal Strength: 85% | Message: Routine check, systems OK.
|
15 |
-
2025-04-12 10:02 UTC | 40.8N, 74.1W | Signal Strength: 60% | Message: Noise detected,
|
16 |
-
2025-04-12 10:03 UTC | 40.9N, 74.2W | Signal Strength: 90% | Message: Emergency: Low battery alert.
|
17 |
"""
|
18 |
|
19 |
def analyze_log(log_text):
|
@@ -24,10 +24,10 @@ def analyze_log(log_text):
|
|
24 |
"messages": [
|
25 |
{
|
26 |
"role": "user",
|
27 |
-
"content": "Analyze this satellite radio log and summarize in bullet points:\n- Issues (e.g., low signal, noise)\n- High-priority messages (e.g., emergencies)\n- Key details (e.g., coordinates, times)\nLog:\n" + log_text
|
28 |
}
|
29 |
],
|
30 |
-
"max_completion_tokens":
|
31 |
"temperature": 0.5
|
32 |
}
|
33 |
try:
|
@@ -41,7 +41,7 @@ def load_sample_log():
|
|
41 |
|
42 |
with gr.Blocks() as interface:
|
43 |
gr.Markdown("# Satellite Signal Log Analyzer")
|
44 |
-
gr.Markdown("Enter a satellite radio log to detect issues and
|
45 |
log_input = gr.Textbox(lines=5, label="Satellite Radio Log")
|
46 |
sample_button = gr.Button("Load Sample Log")
|
47 |
output = gr.Textbox(label="Analysis Summary")
|
|
|
9 |
"Content-Type": "application/json"
|
10 |
}
|
11 |
|
12 |
+
# Updated sample log with frequencies
|
13 |
SAMPLE_LOG = """
|
14 |
+
2025-04-12 10:01 UTC | 40.7N, 74.0W | Frequency: 14.5 GHz | Signal Strength: 85% | Message: Routine check, systems OK.
|
15 |
+
2025-04-12 10:02 UTC | 40.8N, 74.1W | Frequency: 14.7 GHz | Signal Strength: 60% | Message: Noise detected, possible interference.
|
16 |
+
2025-04-12 10:03 UTC | 40.9N, 74.2W | Frequency: 14.6 GHz | Signal Strength: 90% | Message: Emergency: Low battery alert.
|
17 |
"""
|
18 |
|
19 |
def analyze_log(log_text):
|
|
|
24 |
"messages": [
|
25 |
{
|
26 |
"role": "user",
|
27 |
+
"content": "Analyze this satellite radio log and summarize in bullet points:\n- Issues (e.g., low signal, noise, interference)\n- High-priority messages (e.g., emergencies)\n- Key details (e.g., coordinates, times, frequencies, signal strengths)\nLog:\n" + log_text
|
28 |
}
|
29 |
],
|
30 |
+
"max_completion_tokens": 250, # Increased for more details
|
31 |
"temperature": 0.5
|
32 |
}
|
33 |
try:
|
|
|
41 |
|
42 |
with gr.Blocks() as interface:
|
43 |
gr.Markdown("# Satellite Signal Log Analyzer")
|
44 |
+
gr.Markdown("Enter a satellite radio log to detect issues, priorities, and details (including frequencies) using Llama 4 and Cerebras.")
|
45 |
log_input = gr.Textbox(lines=5, label="Satellite Radio Log")
|
46 |
sample_button = gr.Button("Load Sample Log")
|
47 |
output = gr.Textbox(label="Analysis Summary")
|