Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -139,12 +139,13 @@ def process_audio(audio_file):
|
|
139 |
if not combined_text.strip():
|
140 |
return "No relevant information found in the PDFs", None
|
141 |
prompt = (
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
)
|
146 |
|
147 |
|
|
|
148 |
print(f"Prompt: {prompt}") # Debugging line
|
149 |
|
150 |
chat_completion = client.chat.completions.create(
|
|
|
139 |
if not combined_text.strip():
|
140 |
return "No relevant information found in the PDFs", None
|
141 |
prompt = (
|
142 |
+
f"The user has asked a query related to agricultural practices: {text}. "
|
143 |
+
f"Here are relevant excerpts from the Better Crops South Asia document: {combined_text}. "
|
144 |
+
"Based on this information, please provide accurate advice related to sustainable crop management, pest control, irrigation practices, and any recommendations for improving crop yield in the South Asian region."
|
145 |
)
|
146 |
|
147 |
|
148 |
+
|
149 |
print(f"Prompt: {prompt}") # Debugging line
|
150 |
|
151 |
chat_completion = client.chat.completions.create(
|