RamAnanth1 commited on
Commit
c60eaaf
1 Parent(s): 5369792

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ rtf_model = REaLTabFormer(
8
  gradient_accumulation_steps=1)
9
 
10
 
11
- def generate_data(file):
12
  if '.arff' in file.name:
13
  data = arff.loadarff(open(file.name,'rt'))
14
  df = pd.DataFrame(data[0])
@@ -16,7 +16,7 @@ def generate_data(file):
16
  df = pd.read_csv(file.name)
17
  rtf_model.fit(df)
18
  # Generate synthetic data
19
- samples = rtf_model.sample(n_samples=5)
20
 
21
  return df.head(),samples
22
 
 
8
  gradient_accumulation_steps=1)
9
 
10
 
11
+ def generate_data(file, num_samples):
12
  if '.arff' in file.name:
13
  data = arff.loadarff(open(file.name,'rt'))
14
  df = pd.DataFrame(data[0])
 
16
  df = pd.read_csv(file.name)
17
  rtf_model.fit(df)
18
  # Generate synthetic data
19
+ samples = rtf_model.sample(n_samples=num_samples)
20
 
21
  return df.head(),samples
22