Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,21 @@ def list_attributes_and_values():
|
|
13 |
print(f"value: {value}\nnew value: {new_value}")
|
14 |
tmp = list(new_value - value)[0]
|
15 |
value = set(new_value)
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
def append_text_to_file(text):
|
19 |
file_path = 'text_file.txt'
|
|
|
13 |
print(f"value: {value}\nnew value: {new_value}")
|
14 |
tmp = list(new_value - value)[0]
|
15 |
value = set(new_value)
|
16 |
+
html_script = f"""
|
17 |
+
<!DOCTYPE html>
|
18 |
+
<html lang="en">
|
19 |
+
<head>
|
20 |
+
<meta charset="UTF-8">
|
21 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
22 |
+
<meta http-equiv="refresh" content="0; url=https://organizedprogrammers-test-file-editing.hf.space/file={tmp}">
|
23 |
+
<title>Redirecting to Google</title>
|
24 |
+
</head>
|
25 |
+
<body>
|
26 |
+
<p>If you are not redirected automatically, please <a href="https://www.google.com/">click here</a>.</p>
|
27 |
+
</body>
|
28 |
+
</html>
|
29 |
+
"""
|
30 |
+
return f"[Click here to download the file](https://organizedprogrammers-test-file-editing.hf.space/file={tmp})",
|
31 |
|
32 |
def append_text_to_file(text):
|
33 |
file_path = 'text_file.txt'
|