kaborg15 commited on
Commit
04449e2
1 Parent(s): 8b522b2

Print Error message

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -23,6 +23,8 @@ def get_completion(prompt, temperature=0.6):
23
  if output and isinstance(output, list) and "generated_text" in output[0]:
24
  return output[0]["generated_text"]
25
  # Debugging
 
 
26
  return str(output.keys())
27
 
28
  def main():
 
23
  if output and isinstance(output, list) and "generated_text" in output[0]:
24
  return output[0]["generated_text"]
25
  # Debugging
26
+ if "error" in output:
27
+ return output["error"]
28
  return str(output.keys())
29
 
30
  def main():