Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,8 @@ pipe = pipeline("text-classification", model="rbarac/open-rotor-copilot") # Or
|
|
7 |
def analyze_text_input(input_str):
|
8 |
# Input_str could be: "gyro_std=123.4, vbat_drop=0.91, ..." etc.
|
9 |
result = pipe(input_str)
|
10 |
-
|
|
|
11 |
|
12 |
iface = gr.Interface(
|
13 |
fn=analyze_text_input,
|
|
|
7 |
def analyze_text_input(input_str):
|
8 |
# Input_str could be: "gyro_std=123.4, vbat_drop=0.91, ..." etc.
|
9 |
result = pipe(input_str)
|
10 |
+
out = result[0].get("reason") or result[0].get("explanation") or result[0]["label"]
|
11 |
+
return out
|
12 |
|
13 |
iface = gr.Interface(
|
14 |
fn=analyze_text_input,
|