Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -440,8 +440,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 440 |
|
| 441 |
if __name__ == "__main__":
|
| 442 |
try:
|
| 443 |
-
#
|
| 444 |
-
device = "cpu"
|
| 445 |
print(f"Using device: {device}")
|
| 446 |
|
| 447 |
# 모델 초기화
|
|
@@ -461,7 +461,7 @@ if __name__ == "__main__":
|
|
| 461 |
server_name="0.0.0.0",
|
| 462 |
server_port=7860,
|
| 463 |
show_error=True,
|
| 464 |
-
share=
|
| 465 |
)
|
| 466 |
|
| 467 |
except Exception as e:
|
|
|
|
| 440 |
|
| 441 |
if __name__ == "__main__":
|
| 442 |
try:
|
| 443 |
+
# CUDA 사용 가능 여부 확인
|
| 444 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 445 |
print(f"Using device: {device}")
|
| 446 |
|
| 447 |
# 모델 초기화
|
|
|
|
| 461 |
server_name="0.0.0.0",
|
| 462 |
server_port=7860,
|
| 463 |
show_error=True,
|
| 464 |
+
share=True # share를 True로 설정
|
| 465 |
)
|
| 466 |
|
| 467 |
except Exception as e:
|