Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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=[[
|
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()
|