ananthvk commited on
Commit
7cff4ae
·
1 Parent(s): 4e51fae

update requirements

Browse files
Files changed (4) hide show
  1. README.md +1 -0
  2. app.py +1 -2
  3. requirements-local.txt +162 -0
  4. requirements.txt +157 -2
README.md CHANGED
@@ -9,6 +9,7 @@ app_file: app.py
9
  pinned: false
10
  license: mit
11
  short_description: Fruits classifier using fastai and resnet
 
12
  ---
13
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
9
  pinned: false
10
  license: mit
11
  short_description: Fruits classifier using fastai and resnet
12
+ python_version: 3.12
13
  ---
14
 
15
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -4,11 +4,10 @@ import gradio as gr
4
 
5
  learn = load_learner("fruits-model-v1.pkl")
6
 
7
- categories = ('Apple', 'Banana', 'Grape', 'Mango', 'Strawberry')
8
 
9
  def classify_fruit(img):
10
  pred, idx, probs = learn.predict(img)
11
- return dict(zip(categories, map(float, probs)))
12
 
13
  image = gr.Image(width=224, height=224, type="pil")
14
  label = gr.Label()
 
4
 
5
  learn = load_learner("fruits-model-v1.pkl")
6
 
 
7
 
8
  def classify_fruit(img):
9
  pred, idx, probs = learn.predict(img)
10
+ return {learn.dls.vocab[i]: float(probs[i]) for i in range(len(probs))}
11
 
12
  image = gr.Image(width=224, height=224, type="pil")
13
  label = gr.Label()
requirements-local.txt ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.13.3
4
+ aiosignal==1.4.0
5
+ annotated-doc==0.0.4
6
+ annotated-types==0.7.0
7
+ antlr4-python3-runtime==4.9.3
8
+ anyio==4.12.1
9
+ apsw==3.51.2.0
10
+ apswutils==0.1.2
11
+ asttokens==3.0.1
12
+ attrs==25.4.0
13
+ beartype==0.22.9
14
+ beautifulsoup4==4.14.3
15
+ blis==1.3.3
16
+ blobfile==3.2.0
17
+ brotli==1.2.0
18
+ catalogue==2.0.10
19
+ certifi==2026.2.25
20
+ charset-normalizer==3.4.5
21
+ click==8.3.1
22
+ cloudpathlib==0.23.0
23
+ cloudpickle==3.1.2
24
+ confection==0.1.5
25
+ contourpy==1.3.3
26
+ cycler==0.12.1
27
+ cymem==2.0.13
28
+ datasets==4.6.1
29
+ debugpy==1.8.20
30
+ decorator==5.2.1
31
+ dill==0.4.0
32
+ executing==2.2.1
33
+ fastai==2.8.7
34
+ fastapi==0.135.1
35
+ fastcore==1.12.18
36
+ fastdownload==0.0.7
37
+ fastlite==0.2.4
38
+ fastprogress==1.1.5
39
+ fasttransform==0.0.2
40
+ ffmpy==1.0.0
41
+ filelock==3.25.0
42
+ fonttools==4.61.1
43
+ frozenlist==1.8.0
44
+ fsspec==2026.2.0
45
+ gradio==5.50.0
46
+ gradio_client==1.14.0
47
+ groovy==0.1.2
48
+ h11==0.16.0
49
+ hf-xet==1.3.2
50
+ httpcore==1.0.9
51
+ httptools==0.7.1
52
+ httpx==0.28.1
53
+ huggingface_hub==1.6.0
54
+ idna==3.11
55
+ ipykernel==6.17.1
56
+ ipython==9.11.0
57
+ ipython_pygments_lexers==1.1.1
58
+ itsdangerous==2.2.0
59
+ jedi==0.19.2
60
+ Jinja2==3.1.6
61
+ joblib==1.5.3
62
+ jupyter_client==8.8.0
63
+ jupyter_core==5.9.1
64
+ kagglehub==1.0.0
65
+ kagglesdk==0.1.16
66
+ kiwisolver==1.5.0
67
+ lxml==6.0.2
68
+ markdown-it-py==4.0.0
69
+ MarkupSafe==3.0.3
70
+ matplotlib==3.10.8
71
+ matplotlib-inline==0.2.1
72
+ mdurl==0.1.2
73
+ mpmath==1.3.0
74
+ multidict==6.7.1
75
+ multiprocess==0.70.18
76
+ murmurhash==1.0.15
77
+ nest-asyncio==1.6.0
78
+ networkx==3.6.1
79
+ numpy==2.4.3
80
+ oauthlib==3.3.1
81
+ omegaconf==2.3.0
82
+ orjson==3.11.7
83
+ packaging==26.0
84
+ pandas==2.3.3
85
+ parso==0.8.6
86
+ pexpect==4.9.0
87
+ pillow==11.3.0
88
+ platformdirs==4.9.4
89
+ plum-dispatch==2.7.1
90
+ preshed==3.0.12
91
+ prompt_toolkit==3.0.52
92
+ propcache==0.4.1
93
+ protobuf==7.34.0
94
+ psutil==7.2.2
95
+ ptyprocess==0.7.0
96
+ pure_eval==0.2.3
97
+ pyarrow==23.0.1
98
+ pycryptodomex==3.23.0
99
+ pydantic==2.12.3
100
+ pydantic_core==2.41.4
101
+ pydub==0.25.1
102
+ Pygments==2.19.2
103
+ pyparsing==3.3.2
104
+ python-dateutil==2.9.0.post0
105
+ python-dotenv==1.2.2
106
+ python-fasthtml==0.12.48
107
+ python-multipart==0.0.22
108
+ pytz==2026.1.post1
109
+ PyYAML==6.0.3
110
+ pyzmq==27.1.0
111
+ regex==2026.2.28
112
+ requests==2.32.5
113
+ rich==14.3.3
114
+ ruff==0.15.5
115
+ safehttpx==0.1.7
116
+ safetensors==0.7.0
117
+ scikit-learn==1.8.0
118
+ scipy==1.17.1
119
+ semantic-version==2.10.0
120
+ sentencepiece==0.2.1
121
+ setuptools==82.0.1
122
+ shellingham==1.5.4
123
+ six==1.17.0
124
+ smart_open==7.5.1
125
+ soupsieve==2.8.3
126
+ spacy==3.8.11
127
+ spacy-legacy==3.0.12
128
+ spacy-loggers==1.0.5
129
+ srsly==2.5.2
130
+ stack-data==0.6.3
131
+ starlette==0.52.1
132
+ sympy==1.14.0
133
+ thinc==8.3.10
134
+ threadpoolctl==3.6.0
135
+ tiktoken==0.12.0
136
+ tokenizers==0.22.2
137
+ tomlkit==0.13.3
138
+ torch @ https://download.pytorch.org/whl/cpu/torch-2.10.0%2Bcpu-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=ee40b8a4b4b2cf0670c6fd4f35a7ef23871af956fecb238fbf5da15a72650b1d
139
+ torchao==0.10.0
140
+ torchdata==0.11.0
141
+ torchsummary==1.5.1
142
+ torchtune==0.6.1
143
+ torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.25.0%2Bcpu-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=c1be164e93c68b2dbf460fd58975377c892dbcf3358fb72941709c3857351bba
144
+ tornado==6.5.4
145
+ tqdm==4.67.3
146
+ traitlets==5.14.3
147
+ typer==0.24.1
148
+ typer-slim==0.24.0
149
+ typing-inspection==0.4.2
150
+ typing_extensions==4.15.0
151
+ tzdata==2025.3
152
+ urllib3==2.6.3
153
+ uvicorn==0.41.0
154
+ uvloop==0.22.1
155
+ wasabi==1.1.3
156
+ watchfiles==1.1.1
157
+ wcwidth==0.6.0
158
+ weasel==0.4.3
159
+ websockets==15.0.1
160
+ wrapt==2.1.2
161
+ xxhash==3.6.0
162
+ yarl==1.23.0
requirements.txt CHANGED
@@ -1,7 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  fastai==2.8.7
2
- fastcore==1.12.24
 
3
  fastdownload==0.0.7
4
  fastlite==0.2.4
5
  fastprogress==1.1.5
6
  fasttransform==0.0.2
7
- jupyter==1.1.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.13.3
4
+ aiosignal==1.4.0
5
+ annotated-doc==0.0.4
6
+ annotated-types==0.7.0
7
+ antlr4-python3-runtime==4.9.3
8
+ anyio==4.12.1
9
+ apsw==3.51.2.0
10
+ apswutils==0.1.2
11
+ asttokens==3.0.1
12
+ attrs==25.4.0
13
+ beartype==0.22.9
14
+ beautifulsoup4==4.14.3
15
+ blis==1.3.3
16
+ blobfile==3.2.0
17
+ brotli==1.2.0
18
+ catalogue==2.0.10
19
+ certifi==2026.2.25
20
+ charset-normalizer==3.4.5
21
+ click==8.3.1
22
+ cloudpathlib==0.23.0
23
+ cloudpickle==3.1.2
24
+ confection==0.1.5
25
+ contourpy==1.3.3
26
+ cycler==0.12.1
27
+ cymem==2.0.13
28
+ datasets==4.6.1
29
+ debugpy==1.8.20
30
+ decorator==5.2.1
31
+ dill==0.4.0
32
+ executing==2.2.1
33
  fastai==2.8.7
34
+ fastapi==0.135.1
35
+ fastcore==1.12.18
36
  fastdownload==0.0.7
37
  fastlite==0.2.4
38
  fastprogress==1.1.5
39
  fasttransform==0.0.2
40
+ ffmpy==1.0.0
41
+ filelock==3.25.0
42
+ fonttools==4.61.1
43
+ frozenlist==1.8.0
44
+ fsspec==2026.2.0
45
+ gradio==5.50.0
46
+ gradio_client==1.14.0
47
+ groovy==0.1.2
48
+ h11==0.16.0
49
+ hf-xet==1.3.2
50
+ httpcore==1.0.9
51
+ httptools==0.7.1
52
+ httpx==0.28.1
53
+ huggingface_hub==1.6.0
54
+ idna==3.11
55
+ ipykernel==6.17.1
56
+ ipython==9.11.0
57
+ ipython_pygments_lexers==1.1.1
58
+ itsdangerous==2.2.0
59
+ jedi==0.19.2
60
+ Jinja2==3.1.6
61
+ joblib==1.5.3
62
+ jupyter_client==8.8.0
63
+ jupyter_core==5.9.1
64
+ kagglehub==1.0.0
65
+ kagglesdk==0.1.16
66
+ kiwisolver==1.5.0
67
+ lxml==6.0.2
68
+ markdown-it-py==4.0.0
69
+ MarkupSafe==3.0.3
70
+ matplotlib==3.10.8
71
+ matplotlib-inline==0.2.1
72
+ mdurl==0.1.2
73
+ mpmath==1.3.0
74
+ multidict==6.7.1
75
+ multiprocess==0.70.18
76
+ murmurhash==1.0.15
77
+ nest-asyncio==1.6.0
78
+ networkx==3.6.1
79
+ numpy==2.4.3
80
+ oauthlib==3.3.1
81
+ omegaconf==2.3.0
82
+ orjson==3.11.7
83
+ packaging==26.0
84
+ pandas==2.3.3
85
+ parso==0.8.6
86
+ pexpect==4.9.0
87
+ pillow==11.3.0
88
+ platformdirs==4.9.4
89
+ plum-dispatch==2.7.1
90
+ preshed==3.0.12
91
+ prompt_toolkit==3.0.52
92
+ propcache==0.4.1
93
+ protobuf==7.34.0
94
+ psutil==7.2.2
95
+ ptyprocess==0.7.0
96
+ pure_eval==0.2.3
97
+ pyarrow==23.0.1
98
+ pycryptodomex==3.23.0
99
+ pydantic==2.12.3
100
+ pydantic_core==2.41.4
101
+ pydub==0.25.1
102
+ Pygments==2.19.2
103
+ pyparsing==3.3.2
104
+ python-dateutil==2.9.0.post0
105
+ python-dotenv==1.2.2
106
+ python-fasthtml==0.12.48
107
+ python-multipart==0.0.22
108
+ pytz==2026.1.post1
109
+ PyYAML==6.0.3
110
+ pyzmq==27.1.0
111
+ regex==2026.2.28
112
+ requests==2.32.5
113
+ rich==14.3.3
114
+ ruff==0.15.5
115
+ safehttpx==0.1.7
116
+ safetensors==0.7.0
117
+ scikit-learn==1.8.0
118
+ scipy==1.17.1
119
+ semantic-version==2.10.0
120
+ sentencepiece==0.2.1
121
+ setuptools==82.0.1
122
+ shellingham==1.5.4
123
+ six==1.17.0
124
+ smart_open==7.5.1
125
+ soupsieve==2.8.3
126
+ spacy==3.8.11
127
+ spacy-legacy==3.0.12
128
+ spacy-loggers==1.0.5
129
+ srsly==2.5.2
130
+ stack-data==0.6.3
131
+ starlette==0.52.1
132
+ sympy==1.14.0
133
+ thinc==8.3.10
134
+ threadpoolctl==3.6.0
135
+ tiktoken==0.12.0
136
+ tokenizers==0.22.2
137
+ tomlkit==0.13.3
138
+ torch==2.10.0
139
+ torchao==0.10.0
140
+ torchdata==0.11.0
141
+ torchsummary==1.5.1
142
+ torchtune==0.6.1
143
+ torchvision==0.25.0
144
+ tornado==6.5.4
145
+ tqdm==4.67.3
146
+ traitlets==5.14.3
147
+ typer==0.24.1
148
+ typer-slim==0.24.0
149
+ typing-inspection==0.4.2
150
+ typing_extensions==4.15.0
151
+ tzdata==2025.3
152
+ urllib3==2.6.3
153
+ uvicorn==0.41.0
154
+ uvloop==0.22.1
155
+ wasabi==1.1.3
156
+ watchfiles==1.1.1
157
+ wcwidth==0.6.0
158
+ weasel==0.4.3
159
+ websockets==15.0.1
160
+ wrapt==2.1.2
161
+ xxhash==3.6.0
162
+ yarl==1.23.0