MultivexAI commited on
Commit
bb1abc5
·
verified ·
1 Parent(s): 6c8502c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,7 +1,12 @@
1
  import streamlit as st
2
- import torch
3
- import torch.nn as nn
4
  import os
 
 
 
 
 
 
 
5
 
6
  # architecture
7
  class AddModel(nn.Module):
 
1
  import streamlit as st
 
 
2
  import os
3
+ # Try to import torch and other dependencies
4
+ try:
5
+ import torch
6
+ import torch.nn as nn
7
+ except ModuleNotFoundError as e:
8
+ st.error("Dependencies are still being installed. Please wait a moment and refresh the page.")
9
+ st.stop() # Stop the execution of the script
10
 
11
  # architecture
12
  class AddModel(nn.Module):