cocktailpeanut commited on
Commit
2897af8
·
1 Parent(s): 6543453
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -47,18 +47,18 @@ class Qwen2Connector(nn.Module):
47
  return self.linear(x)
48
 
49
  # Download models if not present
50
- if not os.path.exists(MODEL_CACHE_DIR):
51
- logger.info("Starting model download...")
52
- try:
53
- snapshot_download(
54
- repo_id=MODEL_ID,
55
- local_dir=MODEL_CACHE_DIR,
56
- local_dir_use_symlinks=False
57
- )
58
- logger.info("Model download completed successfully")
59
- except Exception as e:
60
- logger.error(f"Error downloading models: {str(e)}")
61
- raise
62
 
63
  # Initialize models in global context
64
  logger.info("Starting model loading...")
 
47
  return self.linear(x)
48
 
49
  # Download models if not present
50
+ #if not os.path.exists(MODEL_CACHE_DIR):
51
+ logger.info("Starting model download...")
52
+ try:
53
+ snapshot_download(
54
+ repo_id=MODEL_ID,
55
+ local_dir=MODEL_CACHE_DIR,
56
+ local_dir_use_symlinks=False
57
+ )
58
+ logger.info("Model download completed successfully")
59
+ except Exception as e:
60
+ logger.error(f"Error downloading models: {str(e)}")
61
+ raise
62
 
63
  # Initialize models in global context
64
  logger.info("Starting model loading...")