Sam-Orion commited on
Commit
ad30dd5
·
1 Parent(s): dc76833

Indus 3.0 Demo

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py CHANGED
@@ -11,8 +11,30 @@ archive_path = hf_hub_download(
11
  )
12
  extract_dir = "./model"
13
  os.makedirs(extract_dir, exist_ok=True)
 
 
14
  with tarfile.open(archive_path, "r:gz") as tar:
15
  tar.extractall(path=extract_dir)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  # Load from the extracted folder
18
  tokenizer = AutoTokenizer.from_pretrained(extract_dir)
 
11
  )
12
  extract_dir = "./model"
13
  os.makedirs(extract_dir, exist_ok=True)
14
+
15
+ # Extract and list contents
16
  with tarfile.open(archive_path, "r:gz") as tar:
17
  tar.extractall(path=extract_dir)
18
+ print("Archive members:")
19
+ for member in tar.getmembers():
20
+ print(f" {member.name}")
21
+
22
+ # Check what files were actually created
23
+ print("\nExtracted files:")
24
+ for root, dirs, files in os.walk(extract_dir):
25
+ for file in files:
26
+ full_path = os.path.join(root, file)
27
+ print(f" {full_path}")
28
+
29
+ # Check if config.json exists and show its contents
30
+ config_path = os.path.join(extract_dir, "config.json")
31
+ if os.path.exists(config_path):
32
+ import json
33
+ with open(config_path, 'r') as f:
34
+ config = json.load(f)
35
+ print(f"\nconfig.json contents: {config}")
36
+ else:
37
+ print(f"\nconfig.json not found at {config_path}")
38
 
39
  # Load from the extracted folder
40
  tokenizer = AutoTokenizer.from_pretrained(extract_dir)