Prathmesh48 commited on
Commit
23b62b8
·
verified ·
1 Parent(s): 080d2c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -14,11 +14,16 @@ def list_files_and_folders():
14
  except Exception as e:
15
  return f"Error: {str(e)}"
16
 
 
 
 
 
17
  iface = gr.Interface(
18
- fn=list_files_and_folders,
19
  inputs=None,
20
  outputs=gr.outputs.Textbox(label="Files and folders in current directory"),
21
  title="List Files and Folders in Current Directory"
22
  )
23
 
 
24
  iface.launch()
 
14
  except Exception as e:
15
  return f"Error: {str(e)}"
16
 
17
+ # Display the current working directory's contents
18
+ output_text = list_files_and_folders()
19
+
20
+ # Define the Gradio interface to display the output text
21
  iface = gr.Interface(
22
+ fn=lambda: output_text,
23
  inputs=None,
24
  outputs=gr.outputs.Textbox(label="Files and folders in current directory"),
25
  title="List Files and Folders in Current Directory"
26
  )
27
 
28
+ # Launch the Gradio interface
29
  iface.launch()