feng2022 commited on
Commit
2a94d15
1 Parent(s): 3ad9d4a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -52,12 +52,16 @@ def predict(text):
52
  return pipe(text)[0]["translation_text"]
53
 
54
  def main():
 
 
 
 
55
  load_model("stylegan2-ffhq-config-f","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f")
56
  iface = gr.Interface(
57
  fn=predict,
58
  inputs='text',
59
  outputs='text',
60
- examples=[["Time-TravelRephotography"]]
61
  )
62
 
63
  iface.launch()
 
52
  return pipe(text)[0]["translation_text"]
53
 
54
  def main():
55
+ if torch.cuda.is_available():
56
+ result = "True"
57
+ else:
58
+ result = "False"
59
  load_model("stylegan2-ffhq-config-f","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f")
60
  iface = gr.Interface(
61
  fn=predict,
62
  inputs='text',
63
  outputs='text',
64
+ examples=[[result]]
65
  )
66
 
67
  iface.launch()