import gradio as gr import subprocess def list_dependencies(): # Run 'pip freeze' to list installed packages result = subprocess.run(["pip", "freeze"], capture_output=True, text=True) return result.stdout demo = gr.Interface( fn=list_dependencies, inputs=[], # No inputs required outputs="text" ) if __name__ == "__main__": demo.launch()