quynhthames commited on
Commit
3d16210
·
1 Parent(s): d446833
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -4,12 +4,13 @@ import torch
4
  import shutil
5
  import os
6
 
7
- source_dir = "math-solver"
 
8
  destination_dir = "."
9
 
10
  print("Current working directory:", os.getcwd())
11
- print("Contents of root:", os.listdir("."))
12
- print("Contents of math-solver:", os.listdir(source_dir) if os.path.exists(source_dir) else "Not found")
13
 
14
  # Check if the source directory exists
15
  if os.path.exists(source_dir) and os.path.isdir(source_dir):
@@ -25,6 +26,9 @@ if os.path.exists(source_dir) and os.path.isdir(source_dir):
25
  else:
26
  print(f"Directory '{source_dir}' not found. No files moved.")
27
 
 
 
 
28
  # Load your model from Hugging Face
29
  tokenizer = T5Tokenizer.from_pretrained("quynhthames/vietnamese-math-solver")
30
  model = T5ForConditionalGeneration.from_pretrained("quynhthames/vietnamese-math-solver")
 
4
  import shutil
5
  import os
6
 
7
+ # Adjust the source path to go one level up
8
+ source_dir = "../math-solver"
9
  destination_dir = "."
10
 
11
  print("Current working directory:", os.getcwd())
12
+ print("Root directory contents:", os.listdir(".."))
13
+ print("Math-solver directory contents:", os.listdir("../math-solver") if os.path.exists("../math-solver") else "Not found")
14
 
15
  # Check if the source directory exists
16
  if os.path.exists(source_dir) and os.path.isdir(source_dir):
 
26
  else:
27
  print(f"Directory '{source_dir}' not found. No files moved.")
28
 
29
+
30
+
31
+
32
  # Load your model from Hugging Face
33
  tokenizer = T5Tokenizer.from_pretrained("quynhthames/vietnamese-math-solver")
34
  model = T5ForConditionalGeneration.from_pretrained("quynhthames/vietnamese-math-solver")