Spaces:
Runtime error
Runtime error
Update app.py
Browse files123456789101112131415161718192021222324252627282930import gradio as grfrom fastai.vision.all import load_learner, Pathimport torch# Function to perform sequence predictiondef sequence_prediction(video_path):# Load the Fastai model inside the functionmodelx = load_learner('r3d_apparel.pkl')result = modelx.predict(Path(video_path))return result[0]# Gradio interfaceiface = gr.Interface(fn=sequence_prediction,inputs=gr.Video(label="Upload a video file"),outputs="text",live=True # Set live to True to get real-time updates)# Launch the Gradio appiface.launch()
app.py+30