Spaces:
Runtime error
Runtime error
File size: 504 Bytes
bf2c0a4 0b1c3b9 bf2c0a4 70af9dc bf2c0a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import gradio as gr
import huggingface_hub
huggingface_hub.snapshot_download(
repo_id='h94/IP-Adapter',
allow_patterns=[
'models/**',
],
local_dir='models',
local_dir_use_symlinks=False,
)
import os
# specify the directory path
dir_path = 'models/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() |