rifatramadhani commited on
Commit
b853b00
·
1 Parent(s): ab685db
Files changed (2) hide show
  1. app.py +23 -1
  2. requirements.txt +130 -0
app.py CHANGED
@@ -1,3 +1,25 @@
1
  import gradio as gr
 
 
2
 
3
- gr.load("models/wisdomik/QuiltNet-B-16").launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ # Use a pipeline as a high-level helper
3
+ from transformers import pipeline
4
 
5
+ # pipe = pipeline("zero-shot-image-classification", model="google/siglip-base-patch16-256-multilingual")
6
+
7
+ # gr.load("models/wisdomik/QuiltNet-B-16").launch()
8
+
9
+ # gr.load("models/google/siglip-base-patch16-256-multilingual").launch()
10
+
11
+ # gr.Interface.from_pipeline(pipe).launch()
12
+
13
+ classifier = pipeline(model="google/siglip-so400m-patch14-384")
14
+ result = classifier(
15
+ "https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png",
16
+ candidate_labels=["animals", "humans", "landscape"],
17
+ )
18
+
19
+ print(result)
20
+
21
+ def greet(name):
22
+ return "Hello " + name + "!!"
23
+
24
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
25
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==23.2.1
2
+ aiohttp==3.9.5
3
+ aiosignal==1.3.1
4
+ altair==5.3.0
5
+ annotated-types==0.7.0
6
+ anyio==4.4.0
7
+ asttokens==2.4.1
8
+ async-timeout==4.0.3
9
+ attrs==23.2.0
10
+ Authlib==1.3.1
11
+ certifi==2024.7.4
12
+ cffi==1.16.0
13
+ charset-normalizer==3.3.2
14
+ click==8.0.4
15
+ contourpy==1.2.1
16
+ cryptography==42.0.8
17
+ cycler==0.12.1
18
+ datasets==2.20.0
19
+ decorator==5.1.1
20
+ dill==0.3.8
21
+ dnspython==2.6.1
22
+ email_validator==2.2.0
23
+ exceptiongroup==1.2.1
24
+ executing==2.0.1
25
+ fastapi==0.111.0
26
+ fastapi-cli==0.0.4
27
+ ffmpy==0.3.2
28
+ filelock==3.15.4
29
+ fonttools==4.53.0
30
+ frozenlist==1.4.1
31
+ fsspec==2024.5.0
32
+ gradio==4.37.2
33
+ gradio_client==1.0.2
34
+ h11==0.14.0
35
+ hf_transfer==0.1.6
36
+ httpcore==1.0.5
37
+ httptools==0.6.1
38
+ httpx==0.27.0
39
+ huggingface-hub==0.23.4
40
+ idna==3.7
41
+ importlib_resources==6.4.0
42
+ ipython==8.26.0
43
+ itsdangerous==2.2.0
44
+ jedi==0.19.1
45
+ Jinja2==3.1.4
46
+ jsonschema==4.22.0
47
+ jsonschema-specifications==2023.12.1
48
+ kiwisolver==1.4.5
49
+ markdown-it-py==3.0.0
50
+ MarkupSafe==2.1.5
51
+ matplotlib==3.9.1
52
+ matplotlib-inline==0.1.7
53
+ mdurl==0.1.2
54
+ mpmath==1.3.0
55
+ multidict==6.0.5
56
+ multiprocess==0.70.16
57
+ networkx==3.3
58
+ numpy==1.26.4
59
+ nvidia-cublas-cu12==12.1.3.1
60
+ nvidia-cuda-cupti-cu12==12.1.105
61
+ nvidia-cuda-nvrtc-cu12==12.1.105
62
+ nvidia-cuda-runtime-cu12==12.1.105
63
+ nvidia-cudnn-cu12==8.9.2.26
64
+ nvidia-cufft-cu12==11.0.2.54
65
+ nvidia-curand-cu12==10.3.2.106
66
+ nvidia-cusolver-cu12==11.4.5.107
67
+ nvidia-cusparse-cu12==12.1.0.106
68
+ nvidia-nccl-cu12==2.20.5
69
+ nvidia-nvjitlink-cu12==12.5.82
70
+ nvidia-nvtx-cu12==12.1.105
71
+ orjson==3.10.6
72
+ packaging==24.1
73
+ pandas==2.2.2
74
+ parso==0.8.4
75
+ pexpect==4.9.0
76
+ pillow==10.4.0
77
+ prompt_toolkit==3.0.47
78
+ protobuf==3.20.3
79
+ psutil==5.9.8
80
+ ptyprocess==0.7.0
81
+ pure-eval==0.2.2
82
+ pyarrow==16.1.0
83
+ pyarrow-hotfix==0.6
84
+ pycparser==2.22
85
+ pydantic==2.8.2
86
+ pydantic_core==2.20.1
87
+ pydub==0.25.1
88
+ Pygments==2.18.0
89
+ pyparsing==3.1.2
90
+ python-dateutil==2.9.0.post0
91
+ python-dotenv==1.0.1
92
+ python-multipart==0.0.9
93
+ pytz==2024.1
94
+ PyYAML==6.0.1
95
+ referencing==0.35.1
96
+ regex==2024.5.15
97
+ requests==2.32.3
98
+ rich==13.7.1
99
+ rpds-py==0.18.1
100
+ ruff==0.5.0
101
+ safetensors==0.4.3
102
+ semantic-version==2.10.0
103
+ sentencepiece==0.2.0
104
+ shellingham==1.5.4
105
+ six==1.16.0
106
+ sniffio==1.3.1
107
+ spaces==0.28.3
108
+ stack-data==0.6.3
109
+ starlette==0.37.2
110
+ sympy==1.12.1
111
+ tokenizers==0.19.1
112
+ tomlkit==0.12.0
113
+ toolz==0.12.1
114
+ torch==2.3.1
115
+ tqdm==4.66.4
116
+ traitlets==5.14.3
117
+ transformers==4.42.3
118
+ triton==2.3.1
119
+ typer==0.12.3
120
+ typing_extensions==4.12.2
121
+ tzdata==2024.1
122
+ ujson==5.10.0
123
+ urllib3==2.2.2
124
+ uvicorn==0.30.1
125
+ uvloop==0.19.0
126
+ watchfiles==0.22.0
127
+ wcwidth==0.2.13
128
+ websockets==11.0.3
129
+ xxhash==3.4.1
130
+ yarl==1.9.4