Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -139,12 +139,13 @@ class BasicAgent:
|
|
139 |
elif file_info.endswith(".py"):
|
140 |
print_coso("Python code file detected")
|
141 |
code_content = get_or_download_code(file_info)
|
142 |
-
prompt
|
|
|
143 |
"The following Python code is attached. Please analyze it and provide only the final output:\n\n"
|
144 |
f"{code_content}\n\n"
|
145 |
f"Question: {question}"
|
146 |
)
|
147 |
-
risposta = self._ask_gpt4o(
|
148 |
|
149 |
elif file_info.endswith(".txt"):
|
150 |
print("coso Text file detected")
|
|
|
139 |
elif file_info.endswith(".py"):
|
140 |
print_coso("Python code file detected")
|
141 |
code_content = get_or_download_code(file_info)
|
142 |
+
print_coso(f"Python code before prompt: {code_content}")
|
143 |
+
prompt_python = (
|
144 |
"The following Python code is attached. Please analyze it and provide only the final output:\n\n"
|
145 |
f"{code_content}\n\n"
|
146 |
f"Question: {question}"
|
147 |
)
|
148 |
+
risposta = self._ask_gpt4o(prompt_python)
|
149 |
|
150 |
elif file_info.endswith(".txt"):
|
151 |
print("coso Text file detected")
|