Metal3d commited on
Commit
d5f1e98
ยท
1 Parent(s): 18f33a7

Fixes version...

Browse files
Files changed (2) hide show
  1. README.md +5 -4
  2. labelizer/__init__.py +2 -2
README.md CHANGED
@@ -8,8 +8,7 @@ sdk_version: 6.0.2
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
- python_version: "3.10"
12
- duplicated_from: metal3d/labelm2
13
  ---
14
 
15
  # ๐Ÿ–ผ๏ธ Labelizer - AI Image Labeling Tool
@@ -27,7 +26,7 @@ An intelligent image labeling tool that uses Florence-2 vision-language model to
27
  ## ๐Ÿš€ How to Use
28
 
29
  1. **Upload Images**: Click "๐Ÿ“ Upload images" to select multiple image files
30
- 2. **Generate Labels**:
31
  - Click "โœจ Generate label" below individual images
32
  - Or click "๐Ÿท๏ธ Labelize all images" for batch processing
33
  3. **Review & Edit**: Modify any generated labels as needed
@@ -43,6 +42,7 @@ An intelligent image labeling tool that uses Florence-2 vision-language model to
43
  ## ๐Ÿ“‹ Supported Tasks
44
 
45
  The tool supports various captioning tasks:
 
46
  - `<MORE_DETAILED_CAPTION>`: Comprehensive image descriptions
47
  - `<DETAILED_CAPTION>`: Detailed but concise descriptions
48
  - `<CAPTION>`: Basic image captions
@@ -62,4 +62,5 @@ The tool supports various captioning tasks:
62
 
63
  ---
64
 
65
- Built with โค๏ธ using [Gradio](https://gradio.app/) and [Florence-2](https://huggingface.co/microsoft/Florence-2-large)
 
 
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
+ python_version: "3.9"
 
12
  ---
13
 
14
  # ๐Ÿ–ผ๏ธ Labelizer - AI Image Labeling Tool
 
26
  ## ๐Ÿš€ How to Use
27
 
28
  1. **Upload Images**: Click "๐Ÿ“ Upload images" to select multiple image files
29
+ 2. **Generate Labels**:
30
  - Click "โœจ Generate label" below individual images
31
  - Or click "๐Ÿท๏ธ Labelize all images" for batch processing
32
  3. **Review & Edit**: Modify any generated labels as needed
 
42
  ## ๐Ÿ“‹ Supported Tasks
43
 
44
  The tool supports various captioning tasks:
45
+
46
  - `<MORE_DETAILED_CAPTION>`: Comprehensive image descriptions
47
  - `<DETAILED_CAPTION>`: Detailed but concise descriptions
48
  - `<CAPTION>`: Basic image captions
 
62
 
63
  ---
64
 
65
+ Built with โค๏ธ using [Gradio](https://gradio.app/) and [Florence-2](https://huggingface.co/microsoft/Florence-2-large)
66
+
labelizer/__init__.py CHANGED
@@ -21,10 +21,10 @@ def _load_model():
21
 
22
  print(f"Loading model {MODEL_ID} on {_device} with dtype {_torch_dtype}...")
23
  _model = Florence2ForConditionalGeneration.from_pretrained(
24
- MODEL_ID, torch_dtype=_torch_dtype, trust_remote_code=True
25
  ).to(_device) # type: ignore
26
  _processor = Florence2Processor.from_pretrained(
27
- MODEL_ID, trust_remote_code=True
28
  )
29
  print("Model loaded successfully!")
30
 
 
21
 
22
  print(f"Loading model {MODEL_ID} on {_device} with dtype {_torch_dtype}...")
23
  _model = Florence2ForConditionalGeneration.from_pretrained(
24
+ MODEL_ID, dtype=_torch_dtype, trust_remote_code=True
25
  ).to(_device) # type: ignore
26
  _processor = Florence2Processor.from_pretrained(
27
+ MODEL_ID, trust_remote_code=True, use_fast=True
28
  )
29
  print("Model loaded successfully!")
30