JPBianchi commited on
Commit
ef5768a
1 Parent(s): 30eb437

removed some finetuning messages

Browse files
Files changed (2) hide show
  1. app.py +5 -4
  2. finetune_backend.py +2 -5
app.py CHANGED
@@ -310,11 +310,12 @@ def main():
310
  # st.write(f"model_path returned = {model_path}")
311
  if model_path is not None:
312
  if model_name_or_path.split('/')[-1] not in model_path:
313
- st.write(model_path) # a warning from finetuning in this case
314
- elif model_path not in available_models:
315
  # finetuning generated a model, let's add it
316
- available_models.append(model_path)
317
- st.write("Model saved in list!")
 
318
  except Exception:
319
  st.write("Model not found on HF or error")
320
  else:
 
310
  # st.write(f"model_path returned = {model_path}")
311
  if model_path is not None:
312
  if model_name_or_path.split('/')[-1] not in model_path:
313
+ st.sidebar.write(model_path) # a warning from finetuning in this case
314
+ # elif model_path not in available_models:
315
  # finetuning generated a model, let's add it
316
+ # no because it's not in Weaviate, so we can't use it
317
+ # available_models.append(model_path)
318
+ # st.write(f"{model_path.split('/')[-1]} added to list!")
319
  except Exception:
320
  st.write("Model not found on HF or error")
321
  else:
finetune_backend.py CHANGED
@@ -51,10 +51,7 @@ def finetune(model: str='sentence-transformers/all-mpnet-base-v2',
51
  return "Timeout!" # will be displayed by app.py
52
 
53
  end = time.perf_counter() - start
54
-
55
- # with st.sidebar:
56
- # c1,c2 = st.columns([8,1])
57
- # with c1:
58
  st.sidebar.write(f"Finetuning with GPU lasted {end:.2f} seconds")
59
 
60
  if savemodel:
@@ -71,5 +68,5 @@ def finetune(model: str='sentence-transformers/all-mpnet-base-v2',
71
  # or save as folder directly
72
  zipfile.ZipFile(finetuned_model).extractall(fullpath)
73
 
74
- print(f"Model saved in {fullpath}")
75
  return fullpath
 
51
  return "Timeout!" # will be displayed by app.py
52
 
53
  end = time.perf_counter() - start
54
+
 
 
 
55
  st.sidebar.write(f"Finetuning with GPU lasted {end:.2f} seconds")
56
 
57
  if savemodel:
 
68
  # or save as folder directly
69
  zipfile.ZipFile(finetuned_model).extractall(fullpath)
70
 
71
+ st.sidebar.write(f"Model saved in {fullpath}")
72
  return fullpath