Spaces:
Sleeping
Sleeping
File size: 239 Bytes
da607b8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import gradio as gr
import os
# create a new file
with open('myfile.txt', 'w') as f:
f.write("abc")
# get the absolute path of the file
abs_path = os.path.abspath('myfile.txt')
gr.Interface(lambda x:abs_path, "textbox", "textbox") |