Spaces:
Sleeping
Sleeping
Commit
·
1cec090
1
Parent(s):
fb9ca50
Update app.py
Browse files
app.py
CHANGED
@@ -83,7 +83,9 @@ def get_response(prompt):
|
|
83 |
)
|
84 |
return response.choices[0].message['content']
|
85 |
|
86 |
-
def extract(file, prompt_text)
|
|
|
|
|
87 |
prompt = get_prompt(file.name, prompt_text)
|
88 |
return get_response(prompt)
|
89 |
|
|
|
83 |
)
|
84 |
return response.choices[0].message['content']
|
85 |
|
86 |
+
def extract(file, prompt_text):
|
87 |
+
if file is None:
|
88 |
+
return "Please upload a file."
|
89 |
prompt = get_prompt(file.name, prompt_text)
|
90 |
return get_response(prompt)
|
91 |
|