radinplaid commited on
Commit
a9289c4
·
verified ·
1 Parent(s): cf919d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -79,7 +79,7 @@ def server(input, output, session):
79
  #print(f"Downloading {input.model()} to {input.model_folder()}")
80
  hf_download(
81
  model_name="quickmt/" + input.model(),
82
- output_dir=Path("/tmp") / input.model(),
83
  )
84
  return "Model downloaded"
85
 
@@ -87,12 +87,12 @@ def server(input, output, session):
87
  @reactive.event(input.translate_button) # Take a dependency on the button
88
  def translate():
89
  global t
90
- model_path = Path("/tmp") / input.model()
91
 
92
  if not model_path.exists():
93
  hf_download(
94
  model_name="quickmt/" + input.model(),
95
- output_dir=Path("/tmp") / input.model(),
96
  )
97
  try:
98
  if t is None or str(input.model()) != str(Path(t.model_path).name):
 
79
  #print(f"Downloading {input.model()} to {input.model_folder()}")
80
  hf_download(
81
  model_name="quickmt/" + input.model(),
82
+ output_dir=Path("/code/models") / input.model(),
83
  )
84
  return "Model downloaded"
85
 
 
87
  @reactive.event(input.translate_button) # Take a dependency on the button
88
  def translate():
89
  global t
90
+ model_path = Path("/code/models") / input.model()
91
 
92
  if not model_path.exists():
93
  hf_download(
94
  model_name="quickmt/" + input.model(),
95
+ output_dir=Path("/code/models") / input.model(),
96
  )
97
  try:
98
  if t is None or str(input.model()) != str(Path(t.model_path).name):