Spaces:
Build error
Build error
Update app.py
Browse files13 unmodified lines141516171718192013 unmodified lines model = resnet50(pretrained=True) model.fc = torch.nn.Linear(model.fc.in_features, 2) # 2 classes: bullish and bearish try: state_dict = torch.load('/Users/kaylahoffman/Desktop/full_model.pt', map_location=torch.device('cpu')) state_dict = torch.load('/Users/kaylahoffman/Desktop/stock_prediction_model.h5', map_location=torch.device('cpu')) model.load_state_dict(state_dict) st.success("Model loaded successfully!") except Exception as e:app.py+1-1