allenpark commited on
Commit
1aa6e35
·
verified ·
1 Parent(s): a32e6bd

add base case check if any parameters are empty (return two empty strings)

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -75,6 +75,8 @@ def clean_json_string(json_str):
75
  return json_str
76
 
77
  def model_call(question, document, answer):
 
 
78
  NEW_FORMAT = PROMPT.format(question=question, document=document, answer=answer)
79
  print("ENTIRE NEW_FORMAT", NEW_FORMAT)
80
  response = client.completions.create(
 
75
  return json_str
76
 
77
  def model_call(question, document, answer):
78
+ if question === "" or document === "" or answer === "":
79
+ return "", ""
80
  NEW_FORMAT = PROMPT.format(question=question, document=document, answer=answer)
81
  print("ENTIRE NEW_FORMAT", NEW_FORMAT)
82
  response = client.completions.create(