Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ import gradio as gr
|
|
| 2 |
import time
|
| 3 |
import spaces
|
| 4 |
from PIL import Image
|
| 5 |
-
from transformers import Qwen3VLForConditionalGeneration, Qwen2VLForConditionalGeneration, AutoProcessor
|
| 6 |
from qwen_vl_utils import process_vision_info
|
| 7 |
import torch
|
| 8 |
import uuid
|
|
@@ -17,9 +17,9 @@ MODEL_CONFIGS = {
|
|
| 17 |
"prompt": "Below is the image of one page of a document, as well as some raw textual content that was previously extracted for it. Just return the plain text representation of this document as if you were reading it naturally. Do not hallucinate.",
|
| 18 |
"use_qwen3": False
|
| 19 |
},
|
| 20 |
-
"
|
| 21 |
-
"name": "
|
| 22 |
-
"class":
|
| 23 |
"prompt": "Free OCR.",
|
| 24 |
"use_qwen3": True
|
| 25 |
}
|
|
|
|
| 2 |
import time
|
| 3 |
import spaces
|
| 4 |
from PIL import Image
|
| 5 |
+
from transformers import Qwen3VLForConditionalGeneration, Qwen2VLForConditionalGeneration, AutoProcessor, AutoModelForImageTextToText
|
| 6 |
from qwen_vl_utils import process_vision_info
|
| 7 |
import torch
|
| 8 |
import uuid
|
|
|
|
| 17 |
"prompt": "Below is the image of one page of a document, as well as some raw textual content that was previously extracted for it. Just return the plain text representation of this document as if you were reading it naturally. Do not hallucinate.",
|
| 18 |
"use_qwen3": False
|
| 19 |
},
|
| 20 |
+
"KATIB OCR 0.8B 0.1": {
|
| 21 |
+
"name": "oddadmix/Katib-Qwen3.5-0.8B-0.3",
|
| 22 |
+
"class": AutoModelForImageTextToText,
|
| 23 |
"prompt": "Free OCR.",
|
| 24 |
"use_qwen3": True
|
| 25 |
}
|