AjayP13 commited on
Commit
b389f8f
·
verified ·
1 Parent(s): 73da972

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -17,14 +17,14 @@ tinystyler_module.__spec__.loader.exec_module(tinystyler_module)
17
  get_tinystyle_model,
18
  get_style_embedding_model,
19
  get_luar_model,
20
- get_mis_model,
21
  compute_simcse,
22
  run_tinystyler_batch,
23
  ) = (
24
  tinystyler_module.get_tinystyle_model,
25
  tinystyler_module.get_style_embedding_model,
26
  tinystyler_module.get_luar_model,
27
- tinystyler_module.get_mis_model,
28
  tinystyler_module.compute_simcse,
29
  tinystyler_module.run_tinystyler_batch,
30
  )
@@ -55,6 +55,7 @@ def run_tinystyler(source_text, target_texts, reranking, temperature, top_p):
55
  device=device,
56
  seed=42,
57
  log_timing=True,
 
58
  sim_sample=1,
59
  )[0]
60
  except Exception as e:
@@ -110,7 +111,7 @@ with gr.Blocks(theme="ParityError/[email protected]") as demo:
110
  get_tinystyle_model(device)
111
  get_style_embedding_model(device)
112
  get_luar_model(device)
113
- get_mis_model(device)
114
  print("Done loading models.", time())
115
 
116
  gr.Markdown("# TinyStyler Demo")
 
17
  get_tinystyle_model,
18
  get_style_embedding_model,
19
  get_luar_model,
20
+ get_simcse_model,
21
  compute_simcse,
22
  run_tinystyler_batch,
23
  ) = (
24
  tinystyler_module.get_tinystyle_model,
25
  tinystyler_module.get_style_embedding_model,
26
  tinystyler_module.get_luar_model,
27
+ tinystyler_module.get_simcse_model,
28
  tinystyler_module.compute_simcse,
29
  tinystyler_module.run_tinystyler_batch,
30
  )
 
55
  device=device,
56
  seed=42,
57
  log_timing=True,
58
+ sim_func=compute_simcse,
59
  sim_sample=1,
60
  )[0]
61
  except Exception as e:
 
111
  get_tinystyle_model(device)
112
  get_style_embedding_model(device)
113
  get_luar_model(device)
114
+ get_simcse_model(device)
115
  print("Done loading models.", time())
116
 
117
  gr.Markdown("# TinyStyler Demo")