No module named 'torch' while deploying streamlit app

Hi,

I’m trying to deploy my damage detection app using streamlit.

While deploying the app, I get the following error:

Errors:
Traceback (most recent call last):
File “/mount/src/repair_cost_estimator/Model1_largedata/car_part_predictions.py”, line 1, in
import torch
ModuleNotFoundError: No module named ‘torch’

Here’s how I’m installing libraries in my requirements.txt file:

torch==2.0.0
torchvision==0.15.1
torchaudio==2.0.1
streamlit==1.16.0
pandas>=1.5.3
numpy>=1.23.5
Pillow>=9.3.0
shapely>=1.8.5.post1
opencv-python-headless>=4.6.0.66
matplotlib>=3.6.2
boto3>=1.26.24
tqdm>=4.64.1

Link to repo:

Any help would be appreciated. Thank you!

Look for messages related to the installation of torch in the logs.

You have multiple requirements files in your repo, this is bad practice and causes confusion, just use one.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.