rahideer commited on
Commit
03c8514
·
verified ·
1 Parent(s): 678e473

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -23,7 +23,7 @@ warnings.filterwarnings("ignore")
23
  MODEL_NAME = "microsoft/codebert-base"
24
  MAX_LENGTH = 512
25
  DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
26
- DATASET_PATH = "ijadataset2-1.zip" # Update this path if needed
27
 
28
  # Initialize models with caching
29
  @st.cache_resource
@@ -40,13 +40,13 @@ def load_models():
40
  def load_dataset():
41
  try:
42
  # Extract dataset if needed
43
- if not os.path.exists("Diverse_100K_Dataset"):
44
  with zipfile.ZipFile(DATASET_PATH, 'r') as zip_ref:
45
  zip_ref.extractall(".")
46
 
47
  # Load sample pairs (modify this based on your dataset structure)
48
  clone_pairs = []
49
- base_path = "Diverse_100K_Dataset/Subject_CloneTypes_Directories"
50
 
51
  # Example: Load one pair from each clone type
52
  for clone_type in ["Clone_Type1", "Clone_Type2", "Clone_Type3 - ST"]:
 
23
  MODEL_NAME = "microsoft/codebert-base"
24
  MAX_LENGTH = 512
25
  DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
26
+ DATASET_PATH = "archive (1).zip" # Update this path if needed
27
 
28
  # Initialize models with caching
29
  @st.cache_resource
 
40
  def load_dataset():
41
  try:
42
  # Extract dataset if needed
43
+ if not os.path.exists("Subject_CloneTypes_Directories"):
44
  with zipfile.ZipFile(DATASET_PATH, 'r') as zip_ref:
45
  zip_ref.extractall(".")
46
 
47
  # Load sample pairs (modify this based on your dataset structure)
48
  clone_pairs = []
49
+ base_path = "Subject_CloneTypes_Directories"
50
 
51
  # Example: Load one pair from each clone type
52
  for clone_type in ["Clone_Type1", "Clone_Type2", "Clone_Type3 - ST"]: