Spaces:
Sleeping
Sleeping
added model path
Browse files
app.py
CHANGED
|
@@ -112,6 +112,17 @@ demo = gr.Interface(
|
|
| 112 |
description="Enter a question."
|
| 113 |
)
|
| 114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
| 117 |
demo.launch()
|
|
|
|
| 112 |
description="Enter a question."
|
| 113 |
)
|
| 114 |
|
| 115 |
+
import subprocess
|
| 116 |
+
|
| 117 |
+
def reboot_system():
|
| 118 |
+
try:
|
| 119 |
+
# Execute the reboot command
|
| 120 |
+
subprocess.run(['sudo', 'reboot'], check=True)
|
| 121 |
+
except subprocess.CalledProcessError as e:
|
| 122 |
+
print(f"Error occurred while trying to reboot the system: {e}")
|
| 123 |
|
| 124 |
if __name__ == "__main__":
|
| 125 |
+
if os.path.exists("temp.txt"):
|
| 126 |
+
os.remove("temp.txt")
|
| 127 |
+
reboot_system()
|
| 128 |
demo.launch()
|
temp.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
hi
|