Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -201,7 +201,7 @@ class BasicAgent:
|
|
| 201 |
except Exception as e:
|
| 202 |
return f"Excel reading error: {str(e)}"
|
| 203 |
|
| 204 |
-
|
| 205 |
try:
|
| 206 |
response = requests.get(file_url)
|
| 207 |
code_content = response.text
|
|
@@ -224,7 +224,8 @@ class BasicAgent:
|
|
| 224 |
|
| 225 |
# Create a summary of the code file
|
| 226 |
summary = f"Code file ({language}) with {line_count} lines.\n"
|
| 227 |
-
|
|
|
|
| 228 |
|
| 229 |
return summary
|
| 230 |
except Exception as e:
|
|
|
|
| 201 |
except Exception as e:
|
| 202 |
return f"Excel reading error: {str(e)}"
|
| 203 |
|
| 204 |
+
def _read_code_file(self, file_url):
|
| 205 |
try:
|
| 206 |
response = requests.get(file_url)
|
| 207 |
code_content = response.text
|
|
|
|
| 224 |
|
| 225 |
# Create a summary of the code file
|
| 226 |
summary = f"Code file ({language}) with {line_count} lines.\n"
|
| 227 |
+
# Fixed line with proper quote handling
|
| 228 |
+
summary += f"First 10 lines:\n" + "\n".join(code_content.split("\n")[:10])
|
| 229 |
|
| 230 |
return summary
|
| 231 |
except Exception as e:
|