Upload app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,9 @@ Original file is located at
|
|
| 12 |
import locale
|
| 13 |
locale.getpreferredencoding = lambda: "UTF-8"
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
import sys
|
| 19 |
from jinja2 import Template
|
|
@@ -25,7 +26,7 @@ except ImportError:
|
|
| 25 |
pass
|
| 26 |
|
| 27 |
# Download and load the model. Set to_gpu=False if running on a CPU.
|
| 28 |
-
ai = aitextgen(model="minimaxir/magic-the-gathering", to_gpu=
|
| 29 |
|
| 30 |
# This template is similar to Scryfall card formatting
|
| 31 |
TEMPLATE = Template(
|
|
|
|
| 12 |
import locale
|
| 13 |
locale.getpreferredencoding = lambda: "UTF-8"
|
| 14 |
|
| 15 |
+
import os
|
| 16 |
+
|
| 17 |
+
os.system("python3 -m pip install pytorch-lightning==1.7.0 aitextgen")
|
| 18 |
|
| 19 |
import sys
|
| 20 |
from jinja2 import Template
|
|
|
|
| 26 |
pass
|
| 27 |
|
| 28 |
# Download and load the model. Set to_gpu=False if running on a CPU.
|
| 29 |
+
ai = aitextgen(model="minimaxir/magic-the-gathering", to_gpu=False)
|
| 30 |
|
| 31 |
# This template is similar to Scryfall card formatting
|
| 32 |
TEMPLATE = Template(
|