ariG23498 HF staff commited on
Commit
7c5e5ba
·
verified ·
1 Parent(s): b2b6307

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -31,10 +31,10 @@ def process_request(url, question, press_type, compression_ratio):
31
 
32
  # Generate prediction
33
  pred_answer = pipe(context, question=question, press=press)["answer"]
34
- return f"Number of tokens: {num_tokens}\n\nPrediction: {pred_answer}", None
35
 
36
  except Exception as e:
37
- return str(e), None
38
 
39
  # Load pipeline
40
  device = "cuda:0"
 
31
 
32
  # Generate prediction
33
  pred_answer = pipe(context, question=question, press=press)["answer"]
34
+ return pred_answer
35
 
36
  except Exception as e:
37
+ return str(e)
38
 
39
  # Load pipeline
40
  device = "cuda:0"