Spaces:
Running
on
Zero
Running
on
Zero
Update demo.py
Browse files
demo.py
CHANGED
@@ -27,8 +27,8 @@ import requests
|
|
27 |
from datetime import datetime
|
28 |
import random
|
29 |
|
30 |
-
#
|
31 |
-
translator = pipeline("translation", model="Helsinki-NLP/opus-mt-ko-en")
|
32 |
|
33 |
# ๋ฒ์ญ ํจ์
|
34 |
def translate_prompt(korean_prompt):
|
|
|
27 |
from datetime import datetime
|
28 |
import random
|
29 |
|
30 |
+
# ํ์ดํ๋ผ์ธ์ device ์ธ์ ์ถ๊ฐํ์ฌ GPU ์ค์
|
31 |
+
translator = pipeline("translation", model="Helsinki-NLP/opus-mt-ko-en", device="cuda")
|
32 |
|
33 |
# ๋ฒ์ญ ํจ์
|
34 |
def translate_prompt(korean_prompt):
|