Spaces:
Running on Zero
Running on Zero
update app
#2
by prithivMLmods - opened
28 unmodified lines293031323334353673 unmodified lines11011111211311411511654 unmodified lines171172173174175176177115 unmodified lines2932942952962972982992 unmodified lines30230330430530630730828 unmodified linesdevice = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")# Load Behemoth-3B-070225-post0.1MODEL_ID_N = "prithivMLmods/Behemoth-3B-070225-post0.1"processor_n = AutoProcessor.from_pretrained(MODEL_ID_N, trust_remote_code=True)model_n = Qwen2_5_VLForConditionalGeneration.from_pretrained(MODEL_ID_N,73 unmodified linesif model_name == "SkyCaptioner-V1":processor = processor_mmodel = model_melif model_name == "Behemoth-3B-070225-post0.1":processor = processor_nmodel = model_nelif model_name == "SpaceThinker-3B":54 unmodified linesif model_name == "SkyCaptioner-V1":processor = processor_mmodel = model_melif model_name == "Behemoth-3B-070225-post0.1":processor = processor_nmodel = model_nelif model_name == "SpaceThinker-3B":115 unmodified lineswith gr.Accordion("(Result.md)", open=False):markdown_output = gr.Markdown(label="Formatted Result")model_choice = gr.Radio(choices=["SkyCaptioner-V1", "Behemoth-3B-070225-post0.1", "SpaceThinker-3B", "coreOCR-7B-050325-preview", "SpaceOm-3B"],label="Select Model",value="SkyCaptioner-V1")2 unmodified linesgr.Markdown("> [SpaceThinker-Qwen2.5VL-3B](https://huggingface.co/remyxai/SpaceThinker-Qwen2.5VL-3B): thinking/reasoning multimodal/vision-language model (VLM) trained to enhance spatial reasoning.")gr.Markdown("> [coreOCR-7B-050325-preview](https://huggingface.co/prithivMLmods/coreOCR-7B-050325-preview): model is a fine-tuned version of qwen/qwen2-vl-7b, optimized for document-level optical character recognition (ocr), long-context vision-language understanding.")gr.Markdown("> [SpaceOm](https://huggingface.co/remyxai/SpaceOm): SpaceOm, the reasoning traces in the spacethinker dataset average ~200 thinking tokens, so now included longer reasoning traces in the training data to help the model use more tokens in reasoning.")gr.Markdown("> [Behemoth-3B-070225-post0.1](https://huggingface.co/prithivMLmods/Behemoth-3B-070225-post0.1): The behemoth-3b-070225-post0.1 model is a fine-tuned version of qwen2.5-vl-3b-instruct, optimized for detailed image captioning, OCR tasks, and chain-of-thought reasoning.")gr.Markdown(">⚠️note: all the models in space are not guaranteed to perform well in video inference use cases.")image_submit.click(28 unmodified lines293031323334353673 unmodified lines11011111211311411511654 unmodified lines171172173174175176177115 unmodified lines2932942952962972982992 unmodified lines30230330430530630730828 unmodified linesdevice = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")# Load DeepCaption-VLA-7BMODEL_ID_N = "prithivMLmods/DeepCaption-VLA-7B"processor_n = AutoProcessor.from_pretrained(MODEL_ID_N, trust_remote_code=True)model_n = Qwen2_5_VLForConditionalGeneration.from_pretrained(MODEL_ID_N,73 unmodified linesif model_name == "SkyCaptioner-V1":processor = processor_mmodel = model_melif model_name == "DeepCaption-VLA-7B":processor = processor_nmodel = model_nelif model_name == "SpaceThinker-3B":54 unmodified linesif model_name == "SkyCaptioner-V1":processor = processor_mmodel = model_melif model_name == "DeepCaption-VLA-7B":processor = processor_nmodel = model_nelif model_name == "SpaceThinker-3B":115 unmodified lineswith gr.Accordion("(Result.md)", open=False):markdown_output = gr.Markdown(label="Formatted Result")model_choice = gr.Radio(choices=["SkyCaptioner-V1", "DeepCaption-VLA-7B", "SpaceThinker-3B", "coreOCR-7B-050325-preview", "SpaceOm-3B"],label="Select Model",value="SkyCaptioner-V1")2 unmodified linesgr.Markdown("> [SpaceThinker-Qwen2.5VL-3B](https://huggingface.co/remyxai/SpaceThinker-Qwen2.5VL-3B): thinking/reasoning multimodal/vision-language model (VLM) trained to enhance spatial reasoning.")gr.Markdown("> [coreOCR-7B-050325-preview](https://huggingface.co/prithivMLmods/coreOCR-7B-050325-preview): model is a fine-tuned version of qwen/qwen2-vl-7b, optimized for document-level optical character recognition (ocr), long-context vision-language understanding.")gr.Markdown("> [SpaceOm](https://huggingface.co/remyxai/SpaceOm): SpaceOm, the reasoning traces in the spacethinker dataset average ~200 thinking tokens, so now included longer reasoning traces in the training data to help the model use more tokens in reasoning.")gr.Markdown("> [DeepCaption-VLA-7B](https://huggingface.co/prithivMLmods/Behemoth-3B-070225-post0.1): DeepCaption-VLA-7B model is a fine-tuned version of Qwen2.5-VL-7B-Instruct, tailored for Image Captioning and VLA. This variant is designed to generate precise, highly descriptive captions.")gr.Markdown(">⚠️note: all the models in space are not guaranteed to perform well in video inference use cases.")image_submit.click(
app.py+6-6