Spaces:
Runtime error
Runtime error
Delete launch/enable_public_url.py
Browse files- launch/enable_public_url.py +0 -18
launch/enable_public_url.py
DELETED
|
@@ -1,18 +0,0 @@
|
|
| 1 |
-
def enable_public_url(file_path, old_line, new_line):
|
| 2 |
-
|
| 3 |
-
with open(file_path, 'r') as file:
|
| 4 |
-
lines = file.readlines()
|
| 5 |
-
|
| 6 |
-
for i, line in enumerate(lines):
|
| 7 |
-
if line.strip() == old_line:
|
| 8 |
-
lines[i] = new_line
|
| 9 |
-
break
|
| 10 |
-
|
| 11 |
-
with open(file_path, 'w') as file:
|
| 12 |
-
file.writelines(lines)
|
| 13 |
-
|
| 14 |
-
file_path = '/content/txt2img/app.py'
|
| 15 |
-
old_line = 'demo.queue().launch()'
|
| 16 |
-
new_line = 'demo.queue().launch(share=True)'
|
| 17 |
-
|
| 18 |
-
enable_public_url(file_path, old_line, new_line)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|