win2win commited on
Commit
ab1be21
·
verified ·
1 Parent(s): 11bac7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -27,8 +27,13 @@ try:
27
  "text-classification",
28
  model="win2win/3-epochs-classifier-ver2",
29
  device="cpu", # Force CPU for free tier
30
- torch_dtype=torch.float32 # Avoid mixed precision
 
 
 
31
  )
 
 
32
  print("Model loaded successfully!")
33
  except Exception as e:
34
  print(f"Model loading failed: {str(e)}")
 
27
  "text-classification",
28
  model="win2win/3-epochs-classifier-ver2",
29
  device="cpu", # Force CPU for free tier
30
+ device_map="auto",
31
+ torch_dtype=torch.float32, # Avoid mixed precision
32
+ offline_mode=False, # Force fresh download
33
+ max_retries=3
34
  )
35
+
36
+
37
  print("Model loaded successfully!")
38
  except Exception as e:
39
  print(f"Model loading failed: {str(e)}")