Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ import tempfile
|
|
| 16 |
import zipfile
|
| 17 |
|
| 18 |
# Initialize GLiNER model
|
| 19 |
-
gliner_model = GLiNER.from_pretrained("knowledgator/modern-gliner-bi-base-v1.0")
|
| 20 |
|
| 21 |
DEFAULT_NER_LABELS = "person, organization, location, date, event"
|
| 22 |
|
|
@@ -73,7 +73,7 @@ assistant_prompt = '<|assistant|>\n'
|
|
| 73 |
prompt_suffix = "<|end|>\n"
|
| 74 |
|
| 75 |
@spaces.GPU
|
| 76 |
-
def run_example(image, model_id="Qwen/
|
| 77 |
# First get the OCR text
|
| 78 |
text_input = "Convert the image to text."
|
| 79 |
image_path = array_to_image_path(image)
|
|
|
|
| 16 |
import zipfile
|
| 17 |
|
| 18 |
# Initialize GLiNER model
|
| 19 |
+
# gliner_model = GLiNER.from_pretrained("knowledgator/modern-gliner-bi-base-v1.0")
|
| 20 |
|
| 21 |
DEFAULT_NER_LABELS = "person, organization, location, date, event"
|
| 22 |
|
|
|
|
| 73 |
prompt_suffix = "<|end|>\n"
|
| 74 |
|
| 75 |
@spaces.GPU
|
| 76 |
+
def run_example(image, model_id="Qwen/Qwen3-VL-8B-Instruct", run_ner=False, ner_labels=DEFAULT_NER_LABELS):
|
| 77 |
# First get the OCR text
|
| 78 |
text_input = "Convert the image to text."
|
| 79 |
image_path = array_to_image_path(image)
|