OwensLab/CommunityForensics-Small
Viewer • Updated • 557k • 9.96k • 4
Run OwensLab/commfor-data-preprocessor on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/OwensLab/commfor-data-preprocessor. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/OwensLab/commfor-data-preprocessor on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use OwensLab/commfor-data-preprocessor with Transformers:
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("OwensLab/commfor-data-preprocessor", device_map="auto")This is a data processor for the Community Forensics classifiers. Detailed instructions will be updated at the Community Forensics GitHub_repo in the future.
dataprocessor_hf.py is included in this repository.
import dataprocessor_hf as dphf
from PIL import Image
data_processor = dphf.CommForImageProcessor.from_pretrained('OwensLab/commfor-data-preprocessor', size=384)
img = Image.open('path_to_img.png')
processed_image = data_processor(img, mode='test')
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OwensLab/commfor-data-preprocessor", device_map="auto")