Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import os
|
3 |
+
|
4 |
+
|
5 |
+
# create a new file
|
6 |
+
with open('myfile.txt', 'w') as f:
|
7 |
+
f.write("abc")
|
8 |
+
|
9 |
+
# get the absolute path of the file
|
10 |
+
abs_path = os.path.abspath('myfile.txt')
|
11 |
+
|
12 |
+
|
13 |
+
gr.Interface(lambda x:abs_path, "textbox", "textbox")
|