Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -98,7 +98,6 @@ def save_and_play_audio(audio_recorder):
|
|
| 98 |
return filename
|
| 99 |
return None
|
| 100 |
|
| 101 |
-
|
| 102 |
def create_file(filename, prompt, response, should_save=True):
|
| 103 |
if not should_save:
|
| 104 |
return
|
|
@@ -121,7 +120,7 @@ def create_file(filename, prompt, response, should_save=True):
|
|
| 121 |
# Check for Python code or other resources and add them with markdown title and emoji
|
| 122 |
resources = re.findall(r"```([\s\S]*?)```", response)
|
| 123 |
for resource in resources:
|
| 124 |
-
# Check if the resource
|
| 125 |
if "python" in resource.lower():
|
| 126 |
# Add Code Results title with markdown and emoji
|
| 127 |
combined_content += "# Code Results π\n"
|
|
|
|
| 98 |
return filename
|
| 99 |
return None
|
| 100 |
|
|
|
|
| 101 |
def create_file(filename, prompt, response, should_save=True):
|
| 102 |
if not should_save:
|
| 103 |
return
|
|
|
|
| 120 |
# Check for Python code or other resources and add them with markdown title and emoji
|
| 121 |
resources = re.findall(r"```([\s\S]*?)```", response)
|
| 122 |
for resource in resources:
|
| 123 |
+
# Check if the resource contains Python code
|
| 124 |
if "python" in resource.lower():
|
| 125 |
# Add Code Results title with markdown and emoji
|
| 126 |
combined_content += "# Code Results π\n"
|