CoolFace
Apppublic

wjbmattingly/NuMarkdown-8B-Thinking-Demo

sourceHugging Faceupdated 1y agoView on Hugging Face
6likes
App README

๐Ÿค– NuMarkdown-8B Reasoning Demo

A Gradio-based web application that demonstrates the reasoning capabilities of the NuMarkdown-8B model from NumInd. This app allows users to upload images and see both the model's detailed thinking process and final analysis.

๐ŸŒŸ Features

  • โ€”Visual Analysis: Upload any image for AI analysis
  • โ€”Reasoning Transparency: See the model's step-by-step thinking process
  • โ€”Clean Interface: Side-by-side layout with tall frames for better visibility
  • โ€”Zero GPU Integration: Optimized for HuggingFace Spaces with GPU acceleration
  • โ€”Real-time Processing: Automatic analysis when images are uploaded

๐Ÿš€ Quick Start

Option 1: Deploy to HuggingFace Spaces (Recommended)

  1. 1.Create a new Space on HuggingFace Spaces
  2. 2.Choose:
  3. 3.SDK: Gradio
  4. 4.Hardware: Zero GPU (for best performance)
  5. 5.Upload these files to your Space:
  6. 6.app.py
  7. 7.requirements.txt
  8. 8.README.md
  9. 9.Your Space will automatically build and deploy!

Option 2: Run Locally

bash
# Clone this repository
git clone <your-repo-url>
cd NuMarkdown-8B-Thinking-Demo

# Install dependencies
pip install -r requirements.txt

# Run the application
python app.py

The app will be available at http://localhost:7860

๐Ÿ”ง Technical Details

Model Information

  • โ€”Model: numind/NuMarkdown-8B-reasoning
  • โ€”Type: Vision-Language Model with reasoning capabilities
  • โ€”Framework: Qwen2.5-VL architecture
  • โ€”Features: Structured thinking with <think> and <answer> tags

Dependencies

  • โ€”Gradio 4.44.0: Web interface framework
  • โ€”PyTorch: Deep learning framework
  • โ€”Transformers: HuggingFace model library
  • โ€”Flash Attention 2: Optimized attention mechanism
  • โ€”Spaces: HuggingFace Zero GPU integration

๐Ÿ“ฑ How to Use

  1. 1.Upload an Image: Click on the image upload area on the left side
  2. 2.Wait for Processing: The model will automatically analyze your image
  3. 3.View Results:
  4. 4.Reasoning Panel: See the model's detailed thinking process
  5. 5.Answer Panel: Get the final conclusion or analysis

๐ŸŽฏ Use Cases

  • โ€”Document Analysis: Analyze text, tables, charts, and diagrams
  • โ€”Educational Content: Understand complex visual information
  • โ€”Research: Extract insights from academic papers and figures
  • โ€”General Vision: Describe and analyze any visual content

๐Ÿ› ๏ธ Customization

Modify Generation Parameters

In app.py, you can adjust:

python
model_output = model.generate(
    **model_input, 
    temperature=0.7,      # Creativity level (0.1-1.0)
    max_new_tokens=5000   # Maximum response length
)

UI Customization

The interface uses custom CSS for tall frames. Modify the css parameter in gr.Blocks() to adjust the layout.

๐Ÿ“Š Performance Notes

  • โ€”Zero GPU Spaces: Provides the best performance for this model
  • โ€”Memory Requirements: ~16GB VRAM recommended for optimal performance
  • โ€”Processing Time: Typically 10-30 seconds depending on image complexity

๐Ÿค Contributing

Feel free to submit issues and enhancement requests!

๐Ÿ“„ License

This project is open source. Please check the license of the underlying model (numind/NuMarkdown-8B-reasoning) for commercial use restrictions.

๐Ÿ™ Acknowledgments

  • โ€”NumInd for the amazing NuMarkdown-8B-reasoning model
  • โ€”HuggingFace for the Transformers library and Spaces platform
  • โ€”Gradio for the easy-to-use web interface framework

Built with โค๏ธ for the AI community