Download app.py from Imran1/model: direct link, hf CLI and curl.
- Browser
- Download file 5.88 kB
-
https://huggingface.co/spaces/Imran1/model/resolve/main/app.py
- Command line
-
hf download hf://spaces/Imran1/model/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Imran1/model/resolve/main/app.py
5.88 kB
| import os | |
| os.environ["PIP_ROOT_USER_ACTION"] = "ignore" | |
| os.environ["GRADIO_SSR_MODE"] = "false" | |
| os.environ["GRADIO_DISABLE_SSR"] = "1" | |
| import gradio as gr | |
| import spaces # Mandatory for ZeroGPU Spaces | |
| RESOURCES = [ | |
| { | |
| "name": "Vidi (ByteDance)", | |
| "category": "Video Model", | |
| "description": "ByteDance's multimodal video understanding and generation framework.", | |
| "links": [ | |
| ("π GitHub", "https://github.com/bytedance/vidi"), | |
| ("π Live Demo", "https://vidi.byteintl.com"), | |
| ], | |
| }, | |
| { | |
| "name": "Molmo2-8B (AllenAI)", | |
| "category": "Open-Weight VLM", | |
| "description": "AllenAI's open multimodal vision-language model for rich video and image reasoning.", | |
| "links": [ | |
| ("π€ Hugging Face", "https://huggingface.co/allenai/Molmo2-8B"), | |
| ("π Playground Demo", "https://playground.allenai.org/?model=molmo2-8b"), | |
| ("π Blog Post", "https://allenai.org/blog/molmo2"), | |
| ("βΆοΈ YouTube Video", "https://youtu.be/Ej3Hb3kRiac"), | |
| ], | |
| }, | |
| { | |
| "name": "VideoLLaMA 3 (DAMO-NLP-SG)", | |
| "category": "Video-LLM", | |
| "description": "Frontier multimodal foundation model tailored for image and video understanding.", | |
| "links": [ | |
| ("π GitHub", "https://github.com/DAMO-NLP-SG/VideoLLaMA3"), | |
| ("π HF Space Demo", "https://huggingface.co/spaces/lixin4ever/VideoLLaMA3"), | |
| ], | |
| }, | |
| { | |
| "name": "VideoJev-35B-A3B", | |
| "category": "MoE Video-LLM", | |
| "description": "35B total parameter (3B active) Mixture-of-Experts model for efficient video understanding.", | |
| "links": [ | |
| ("π€ Hugging Face", "https://huggingface.co/ZhuYuhan/VideoJev-35B-A3B"), | |
| ("π HF Space Demo", "https://huggingface.co/spaces/hugging-apps/videojev-35b-a3b"), | |
| ], | |
| }, | |
| { | |
| "name": "Gemini Agentic Video Understanding", | |
| "category": "API & Developer Guides", | |
| "description": "Official Google AI Studio and Gemini API guides for agentic video reasoning and frame-level understanding.", | |
| "links": [ | |
| ("π οΈ AI Studio Developer Guide", "https://aistudio.google.com/learn/agentic-video-understanding-with-gemini"), | |
| ("π Gemini Video Docs", "https://ai.google.dev/gemini-api/docs/video-understanding"), | |
| ], | |
| }, | |
| ] | |
| # Satisfies the ZeroGPU startup scanner | |
| def filter_resources(search_query: str, category_filter: str) -> str: | |
| query = (search_query or "").strip().lower() | |
| sections = [] | |
| for item in RESOURCES: | |
| if category_filter != "All" and item["category"] != category_filter: | |
| continue | |
| if query and ( | |
| query not in item["name"].lower() | |
| and query not in item["description"].lower() | |
| and query not in item["category"].lower() | |
| ): | |
| continue | |
| links_md = " | ".join( | |
| f"**[{label}]({url})**" for label, url in item["links"] | |
| ) | |
| section = ( | |
| f"### {item['name']} `[{item['category']}]`\n" | |
| f"{item['description']}\n\n" | |
| f"π {links_md}\n\n---" | |
| ) | |
| sections.append(section) | |
| if not sections: | |
| return "### No matching models or resources found." | |
| return "\n\n".join(sections) | |
| categories = ["All"] + sorted(list({r["category"] for r in RESOURCES})) | |
| with gr.Blocks(title="Video Understanding Models & Demos Hub") as demo: | |
| gr.Markdown( | |
| """ | |
| # π¬ Video Understanding Models, Demos & Resources | |
| Quick-access directory of multimodal video foundation models, Hugging Face checkpoints, interactive playgrounds, and developer guides. | |
| """ | |
| ) | |
| with gr.Row(): | |
| search_box = gr.Textbox( | |
| label="Search Models / Links", | |
| placeholder="Filter by keyword (e.g., Molmo, VideoLLaMA, Gemini, ByteDance, Vidi)...", | |
| scale=3, | |
| ) | |
| category_dropdown = gr.Dropdown( | |
| choices=categories, | |
| value="All", | |
| label="Category", | |
| scale=1, | |
| ) | |
| gr.Markdown("---") | |
| results_markdown = gr.Markdown(value=filter_resources("", "All")) | |
| with gr.Accordion("π Summary Comparison Table", open=True): | |
| gr.Markdown( | |
| """ | |
| | Model / Resource | Category | Model / Repo Link | Live Demo / Space | Extra Links | | |
| | :--- | :--- | :--- | :--- | :--- | | |
| | **Vidi (ByteDance)** | Video Model | [GitHub](https://github.com/bytedance/vidi) | [Vidi Demo](https://vidi.byteintl.com) | β | | |
| | **Molmo2-8B (AllenAI)** | Open-Weight VLM | [Hugging Face](https://huggingface.co/allenai/Molmo2-8B) | [AllenAI Playground](https://playground.allenai.org/?model=molmo2-8b) | [Blog](https://allenai.org/blog/molmo2) Β· [YouTube](https://youtu.be/Ej3Hb3kRiac) | | |
| | **VideoLLaMA 3** | Video-LLM | [GitHub](https://github.com/DAMO-NLP-SG/VideoLLaMA3) | [HF Space](https://huggingface.co/spaces/lixin4ever/VideoLLaMA3) | β | | |
| | **VideoJev-35B-A3B** | MoE Video-LLM | [Hugging Face](https://huggingface.co/ZhuYuhan/VideoJev-35B-A3B) | [HF Space](https://huggingface.co/spaces/hugging-apps/videojev-35b-a3b) | β | | |
| | **Gemini Video Understanding** | API & Developer Guides | [AI Studio Guide](https://aistudio.google.com/learn/agentic-video-understanding-with-gemini) | β | [API Docs](https://ai.google.dev/gemini-api/docs/video-understanding) | | |
| """ | |
| ) | |
| search_box.change( | |
| fn=filter_resources, | |
| inputs=[search_box, category_dropdown], | |
| outputs=results_markdown, | |
| ) | |
| category_dropdown.change( | |
| fn=filter_resources, | |
| inputs=[search_box, category_dropdown], | |
| outputs=results_markdown, | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch(server_name="0.0.0.0", server_port=7860, ssr_mode=False) |