tykiww commited on
Commit
1c03d71
1 Parent(s): d8dc2cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -5,6 +5,8 @@ import json
5
 
6
  # Specialized imports
7
  #from utilities.modeling import modeling
 
 
8
 
9
  # Module imports
10
  from utilities.setup import get_json_cfg
@@ -31,14 +33,14 @@ def textbox_button_visibility(radio):
31
  def upload_visibility(radio):
32
  value = radio
33
  if value == "Upload Your Own":
34
- return gr.File(visible=bool(1)) #make it visible
35
  else:
36
- return gr.File(visible=bool(0))
 
37
 
38
 
39
 
40
 
41
- from datasets import load_dataset
42
 
43
  def get_predefined_dataset(dataset_name):
44
  dataset = load_dataset(dataset_name, split = "train") #dataset_name
@@ -113,16 +115,16 @@ def main():
113
  value='yahma/alpaca-cleaned',
114
  visible=True)
115
 
116
- dataset_uploaded_load = gr.File(label="Upload Dataset",
117
- file_types=[".csv",".jsonl", ".txt"],
118
- visible=False)
119
 
120
 
121
  dataset_predefined_load = gr.Button("Upload Dataset (.csv, .jsonl, or .txt)")
122
 
123
- #dataset_uploaded_load = gr.UploadButton(label="Upload Dataset (.csv, .jsonl, or .txt)",
124
- # file_types=[".csv",".jsonl", ".txt"],
125
- # visible=False)
126
 
127
  data_field = gr.Textbox(label="Dataset Training Field",
128
  value=conf['model']['general']["dataset_text_field"])
 
5
 
6
  # Specialized imports
7
  #from utilities.modeling import modeling
8
+ from datasets import load_dataset
9
+
10
 
11
  # Module imports
12
  from utilities.setup import get_json_cfg
 
33
  def upload_visibility(radio):
34
  value = radio
35
  if value == "Upload Your Own":
36
+ return gr.UploadButton(visible=bool(1)) #make it visible
37
  else:
38
+ return gr.UploadButton(visible=bool(0))
39
+
40
 
41
 
42
 
43
 
 
44
 
45
  def get_predefined_dataset(dataset_name):
46
  dataset = load_dataset(dataset_name, split = "train") #dataset_name
 
115
  value='yahma/alpaca-cleaned',
116
  visible=True)
117
 
118
+ #dataset_uploaded_load = gr.File(label="Upload Dataset",
119
+ # file_types=[".csv",".jsonl", ".txt"],
120
+ # visible=False)
121
 
122
 
123
  dataset_predefined_load = gr.Button("Upload Dataset (.csv, .jsonl, or .txt)")
124
 
125
+ dataset_uploaded_load = gr.UploadButton(label="Upload Dataset (.csv, .jsonl, or .txt)",
126
+ file_types=[".csv",".jsonl", ".txt"],
127
+ visible=False)
128
 
129
  data_field = gr.Textbox(label="Dataset Training Field",
130
  value=conf['model']['general']["dataset_text_field"])