Spaces:
Sleeping
Sleeping
bluemiracle0214
commited on
Commit
•
13237be
1
Parent(s):
37d744f
Update app.py
Browse files
app.py
CHANGED
@@ -120,7 +120,13 @@ def ask_gpt_based_on_pdfs_from_drive(question, relevance_threshold=4, max_chars=
|
|
120 |
relevant_file_count = len(relevant_files)
|
121 |
total_tokens_used += conclusion_tokens
|
122 |
|
123 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
except Exception as e:
|
126 |
return f"Error occurred: {str(e)}", 0
|
|
|
120 |
relevant_file_count = len(relevant_files)
|
121 |
total_tokens_used += conclusion_tokens
|
122 |
|
123 |
+
return (
|
124 |
+
f"Final GPT response: {final_response}\n"
|
125 |
+
f"Relevant PDF files: {relevant_file_count}\n",
|
126 |
+
total_tokens_used
|
127 |
+
)
|
128 |
+
|
129 |
+
#return "Final GPT response: " + final_response + "\n" + f"Relevant PDF files: {relevant_file_count}" + "\n" + total_tokens_used
|
130 |
|
131 |
except Exception as e:
|
132 |
return f"Error occurred: {str(e)}", 0
|