Model cannot be initiated in React
#1
by
NBayer
- opened
Great model, I used zero shot object detection already with Python, now I tried to run the zero shot object detection in JS, but I somehow cannot initiate the pipeline even though I copied the initiation statement.
I always get this error: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
Looking forward to getting help
Hi there. You can fix this by skipping the local model check:
import { pipeline, env } from '@xenova/transformers';
env.allowLocalModels = false;
(just remember to clear your browser cache too)
Thank you so much! The model does initiate now.
I try to use react-webcam and feed its output to the model. Do you have any idea on how to change the webcam's output to a fitting data type / URL for the model?
Thanks in advance again!