abidlabs HF Staff commited on
Commit
da607b8
·
1 Parent(s): 6934845

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
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")