Download app_test.py from kadirnar/ZeST: direct link, hf CLI and curl.
- Browser
- Download file 524 Bytes
-
https://huggingface.co/spaces/kadirnar/ZeST/resolve/main/app_test.py
- Command line
-
hf download hf://spaces/kadirnar/ZeST/app_test.py
-
curl -L -o app_test.py https://huggingface.co/spaces/kadirnar/ZeST/resolve/main/app_test.py
524 Bytes
| import gradio as gr | |
| import huggingface_hub | |
| huggingface_hub.snapshot_download( | |
| repo_id='h94/IP-Adapter', | |
| allow_patterns=[ | |
| 'models/**', | |
| 'sdxl_models/**', | |
| ], | |
| local_dir='./', | |
| local_dir_use_symlinks=False, | |
| ) | |
| import os | |
| # specify the directory path | |
| dir_path = 'sdxl_models' | |
| # list all files in the directory | |
| files = os.listdir(dir_path) | |
| # print the list of files | |
| print(files) | |
| def infer (text): | |
| return text | |
| gr.Interface(fn=infer, inputs=[gr.Textbox()], outputs=[gr.Textbox()]).launch() |