feng2022 commited on
Commit
6ecbb30
1 Parent(s): 1ece658

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -67,10 +67,9 @@ def load_model(file_name: str, path:str,device: torch.device) -> nn.Module:
67
  model(z, label, force_fp32=True)
68
  return model
69
 
 
70
  def greet(name):
71
  return "Hello " + name + "!"
72
-
73
-
74
  def main():
75
  #torch.cuda.init()
76
  #if torch.cuda.is_initialized():
@@ -82,10 +81,11 @@ def main():
82
  args = ProjectorArguments().parse(
83
  args=[str(input_path)],
84
  namespace=Namespace(
85
- # spectral_sensitivity=spectral_sensitivity,
86
- encoder_ckpt=f"checkpoint/encoder/checkpoint_{spectral_sensitivity}.pt",
87
- # encoder_name=spectral_sensitivity,
88
- # gaussian=gaussian_radius,
 
89
  log_visual_freq=1000,
90
  input='text',
91
  ))
@@ -115,7 +115,6 @@ def main():
115
  #)
116
  demo = gr.Interface(fn=greet, inputs="text", outputs="text")
117
  demo.launch()
118
-
119
  if __name__ == '__main__':
120
  main()
121
 
 
67
  model(z, label, force_fp32=True)
68
  return model
69
 
70
+ #def image_create():
71
  def greet(name):
72
  return "Hello " + name + "!"
 
 
73
  def main():
74
  #torch.cuda.init()
75
  #if torch.cuda.is_initialized():
 
81
  args = ProjectorArguments().parse(
82
  args=[str(input_path)],
83
  namespace=Namespace(
84
+ spectral_sensitivity=spectral_sensitivity,
85
+ encoder_ckpt=f"checkpoint/encoder/c
86
+ heckpoint_{spectral_sensitivity}.pt",
87
+ encoder_name=spectral_sensitivity,
88
+ gaussian=gaussian_radius,
89
  log_visual_freq=1000,
90
  input='text',
91
  ))
 
115
  #)
116
  demo = gr.Interface(fn=greet, inputs="text", outputs="text")
117
  demo.launch()
 
118
  if __name__ == '__main__':
119
  main()
120