rbarac commited on
Commit
234521f
·
verified ·
1 Parent(s): 3f1d92a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- return result[0]["reason"]
 
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,