Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -226,7 +226,7 @@ def export_chat(history):
|
|
226 |
def import_chat(file):
|
227 |
"""Import chat history from a JSONL file."""
|
228 |
try:
|
229 |
-
content = file
|
230 |
lines = [line.strip() for line in content.split("\n") if line.strip()]
|
231 |
|
232 |
messages = [json.loads(line) for line in lines]
|
|
|
226 |
def import_chat(file):
|
227 |
"""Import chat history from a JSONL file."""
|
228 |
try:
|
229 |
+
content = file # Read the file directly as a string
|
230 |
lines = [line.strip() for line in content.split("\n") if line.strip()]
|
231 |
|
232 |
messages = [json.loads(line) for line in lines]
|