Samarth Goel commited on
Commit
491ad49
1 Parent(s): 04a08d3

allow open ended

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -70,11 +70,10 @@ def main():
70
  st.warning("Please enter a prompt.")
71
  return
72
 
73
- if not document_text:
74
- st.warning("Please upload a document.")
75
- return
76
-
77
- full_prompt = f"Document content:\n\n{document_text}\n\nPrompt:\n\n{prompt}"
78
 
79
  if model == "GPT-4o":
80
  with st.spinner("Processing with GPT-4o..."):
 
70
  st.warning("Please enter a prompt.")
71
  return
72
 
73
+ if document_text is None:
74
+ full_prompt = prompt
75
+ else:
76
+ full_prompt = f"Document content:\n\n{document_text}\n\nPrompt:\n\n{prompt}"
 
77
 
78
  if model == "GPT-4o":
79
  with st.spinner("Processing with GPT-4o..."):