MixoMax commited on
Commit
4a09e01
1 Parent(s): c63ed49

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -12,8 +12,9 @@ Original file is located at
12
  import locale
13
  locale.getpreferredencoding = lambda: "UTF-8"
14
 
15
- !pip install aitextgen
16
- !pip install pytorch-lightning==1.7.0
 
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=True)
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(