Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def analyze_ul_interference(data):
|
| 4 |
+
|
| 5 |
+
text = data.upper()
|
| 6 |
+
|
| 7 |
+
findings = []
|
| 8 |
+
causes = []
|
| 9 |
+
actions = []
|
| 10 |
+
|
| 11 |
+
if "UL SINR" in text or "SINR" in text:
|
| 12 |
+
findings.append("Poor uplink SINR detected")
|
| 13 |
+
|
| 14 |
+
if "BLER" in text:
|
| 15 |
+
findings.append("High uplink BLER condition detected")
|
| 16 |
+
|
| 17 |
+
if "RTWP" in text:
|
| 18 |
+
findings.append("Elevated RTWP/noise floor observed")
|
| 19 |
+
|
| 20 |
+
if "UL PRB" in text:
|
| 21 |
+
findings.append("High uplink resource utilization")
|
| 22 |
+
|
| 23 |
+
causes = [
|
| 24 |
+
"External uplink interference",
|
| 25 |
+
"Passive Intermodulation (PIM)",
|
| 26 |
+
"Overshooting sector",
|
| 27 |
+
"Faulty radio or feeder path",
|
| 28 |
+
"High uplink noise rise"
|
| 29 |
+
]
|
| 30 |
+
|
| 31 |
+
actions = [
|
| 32 |
+
"Review RTWP trend history",
|
| 33 |
+
"Compare neighboring sector noise floor",
|
| 34 |
+
"Validate feeder and jumper integrity",
|
| 35 |
+
"Check uplink power control behavior",
|
| 36 |
+
"Perform spectrum sweep if available",
|
| 37 |
+
"Review recent site changes or maintenance"
|
| 38 |
+
]
|
| 39 |
+
|
| 40 |
+
result = f"""
|
| 41 |
+
# UL Interference Analysis
|
| 42 |
+
|
| 43 |
+
## Findings
|
| 44 |
+
{chr(10).join([f"- {x}" for x in findings])}
|
| 45 |
+
|
| 46 |
+
## Likely Causes
|
| 47 |
+
{chr(10).join([f"- {x}" for x in causes])}
|
| 48 |
+
|
| 49 |
+
## Recommended Actions
|
| 50 |
+
{chr(10).join([f"- {x}" for x in actions])}
|
| 51 |
+
|
| 52 |
+
## Engineering Assessment
|
| 53 |
+
Potential uplink interference condition identified based on submitted KPI and PM counter indicators.
|
| 54 |
+
"""
|
| 55 |
+
|
| 56 |
+
return result
|
| 57 |
+
|
| 58 |
+
demo = gr.Interface(
|
| 59 |
+
fn=analyze_ul_interference,
|
| 60 |
+
inputs=gr.Textbox(
|
| 61 |
+
lines=12,
|
| 62 |
+
label="Paste KPI / PM Counter Data",
|
| 63 |
+
value="""UL SINR = -7
|
| 64 |
+
PUSCH BLER = 32%
|
| 65 |
+
RTWP = -95
|
| 66 |
+
UL PRB = 88%
|
| 67 |
+
CQI Avg = 4"""
|
| 68 |
+
),
|
| 69 |
+
outputs=gr.Markdown(),
|
| 70 |
+
title="UL Interference Analyzer",
|
| 71 |
+
description="AI-assisted uplink interference analysis using LTE/5G KPI and PM counter indicators."
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
demo.launch()
|