Spaces:
Running
Running
Commit
·
69e9a8a
1
Parent(s):
119bf39
update
Browse files
app.py
CHANGED
@@ -302,8 +302,8 @@ with gr.Blocks() as demo:
|
|
302 |
stage1_id = uuid.uuid4().hex
|
303 |
os.mkdir(rootpath+'/'+stage1_id+'/')
|
304 |
|
305 |
-
|
306 |
-
outputname = os.path.splitext(
|
307 |
|
308 |
stage1_info = {
|
309 |
"filePath" : rootpath+'/'+stage1_id+'/',
|
@@ -802,8 +802,8 @@ with gr.Blocks() as demo:
|
|
802 |
stage2_id = uuid.uuid4().hex
|
803 |
os.mkdir(rootpath+'/'+stage2_id+'/')
|
804 |
|
805 |
-
|
806 |
-
outputname = modelname+'_'+os.path.splitext(
|
807 |
|
808 |
stage2_info = {
|
809 |
"filePath" : rootpath+'/'+stage2_id+'/',
|
@@ -828,14 +828,16 @@ with gr.Blocks() as demo:
|
|
828 |
inputname = stage2_info["fileNames"]["inputData"]
|
829 |
outputname = stage2_info["fileNames"]["outputData"]
|
830 |
|
|
|
|
|
831 |
break_flag = False
|
832 |
for i in range(batch_num):
|
833 |
yield {batch_md : gr.Markdown('Running model({}/{})...'.format(i+1, batch_num))}
|
834 |
|
835 |
new_idx = mapping_results[i]["newOrder"]
|
836 |
fill_flags = mapping_results[i]["fillFlags"]
|
837 |
-
m_filename = '
|
838 |
-
d_filename = '
|
839 |
try:
|
840 |
# establish a temp folder
|
841 |
os.mkdir(filepath+'temp_data/')
|
|
|
302 |
stage1_id = uuid.uuid4().hex
|
303 |
os.mkdir(rootpath+'/'+stage1_id+'/')
|
304 |
|
305 |
+
in_basename = os.path.basename(str(in_loc))
|
306 |
+
outputname = os.path.splitext(in_basename)[0]+'_mapping_result.json'
|
307 |
|
308 |
stage1_info = {
|
309 |
"filePath" : rootpath+'/'+stage1_id+'/',
|
|
|
802 |
stage2_id = uuid.uuid4().hex
|
803 |
os.mkdir(rootpath+'/'+stage2_id+'/')
|
804 |
|
805 |
+
in_basename = os.path.basename(str(in_data))
|
806 |
+
outputname = modelname+'_'+os.path.splitext(in_basename)[0]+'.csv'
|
807 |
|
808 |
stage2_info = {
|
809 |
"filePath" : rootpath+'/'+stage2_id+'/',
|
|
|
828 |
inputname = stage2_info["fileNames"]["inputData"]
|
829 |
outputname = stage2_info["fileNames"]["outputData"]
|
830 |
|
831 |
+
in_basename = os.path.basename(str(inputname))
|
832 |
+
in_basename = os.path.splitext(in_basename)[0]
|
833 |
break_flag = False
|
834 |
for i in range(batch_num):
|
835 |
yield {batch_md : gr.Markdown('Running model({}/{})...'.format(i+1, batch_num))}
|
836 |
|
837 |
new_idx = mapping_results[i]["newOrder"]
|
838 |
fill_flags = mapping_results[i]["fillFlags"]
|
839 |
+
m_filename = '{}_mapped_{:02d}.csv'.format(in_basename, i+1)
|
840 |
+
d_filename = '{}_denoised_{:02d}.csv'.format(in_basename, i+1)
|
841 |
try:
|
842 |
# establish a temp folder
|
843 |
os.mkdir(filepath+'temp_data/')
|