Spaces:
Sleeping
Sleeping
add base case check if any parameters are empty (return two empty strings)
Browse files
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(
|