Update app.py
Browse files
app.py
CHANGED
|
@@ -94,12 +94,12 @@ fs = HfFileSystem(token=os.environ["acces_token"])
|
|
| 94 |
|
| 95 |
def write_to_file(file_name,content):
|
| 96 |
file_path = f"datasets/mgreg555/samu_reference_book/" + file_name
|
| 97 |
-
with fs.open(file_path, "r") as file_old:
|
| 98 |
-
|
| 99 |
-
|
| 100 |
|
| 101 |
-
with fs.open(file_path, "w") as file:
|
| 102 |
-
|
| 103 |
|
| 104 |
# Example usage
|
| 105 |
|
|
|
|
| 94 |
|
| 95 |
def write_to_file(file_name,content):
|
| 96 |
file_path = f"datasets/mgreg555/samu_reference_book/" + file_name
|
| 97 |
+
# with fs.open(file_path, "r") as file_old:
|
| 98 |
+
# content_old = file_old.read()
|
| 99 |
+
# print(content_old)
|
| 100 |
|
| 101 |
+
# with fs.open(file_path, "w") as file:
|
| 102 |
+
# file.write(f"{content_old}\n" + content)
|
| 103 |
|
| 104 |
# Example usage
|
| 105 |
|