nickgardner commited on
Commit
1fb2550
1 Parent(s): 75575f0

full func test 6

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -2,10 +2,15 @@ import gradio as gr
2
  import torch
3
  from torchtext.data.utils import get_tokenizer
4
  import numpy as np
 
 
5
 
6
  from huggingface_hub import hf_hub_download
7
  from transformer import Transformer
8
 
 
 
 
9
  MAX_LEN = 350
10
 
11
  tokenizer = get_tokenizer('spacy', language='en_core_web_sm')
 
2
  import torch
3
  from torchtext.data.utils import get_tokenizer
4
  import numpy as np
5
+ import subprocess
6
+
7
 
8
  from huggingface_hub import hf_hub_download
9
  from transformer import Transformer
10
 
11
+ model_url = "https://huggingface.co/spacy/en_core_web_sm/resolve/main/en_core_web_sm-any-py3-none-any.whl"
12
+ subprocess.run(["pip", "install", model_url])
13
+
14
  MAX_LEN = 350
15
 
16
  tokenizer = get_tokenizer('spacy', language='en_core_web_sm')