Spaces:
Sleeping
Sleeping
Update AKSHAYRAJAA/inference.py
Browse files- AKSHAYRAJAA/inference.py +3 -1
AKSHAYRAJAA/inference.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
import torch
|
3 |
import config
|
4 |
import spacy
|
5 |
-
|
6 |
from utils import (
|
7 |
load_dataset,
|
8 |
get_model_instance,
|
@@ -13,6 +13,8 @@ from utils import (
|
|
13 |
from PIL import Image
|
14 |
import torchvision.transforms as transforms
|
15 |
import streamlit as st
|
|
|
|
|
16 |
|
17 |
# Define device
|
18 |
DEVICE = 'cpu'
|
|
|
2 |
import torch
|
3 |
import config
|
4 |
import spacy
|
5 |
+
import spacy.cli
|
6 |
from utils import (
|
7 |
load_dataset,
|
8 |
get_model_instance,
|
|
|
13 |
from PIL import Image
|
14 |
import torchvision.transforms as transforms
|
15 |
import streamlit as st
|
16 |
+
spacy.cli.download("en_core_web_sm")
|
17 |
+
nlp = spacy.load("en_core_web_sm")
|
18 |
|
19 |
# Define device
|
20 |
DEVICE = 'cpu'
|