Skip to content

Commit

Permalink
fixes build by removing needless spacy installation
Browse files Browse the repository at this point in the history
  • Loading branch information
w4ffl35 committed Mar 25, 2023
1 parent b8dcb95 commit fd3ca74
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions chatai/llmrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import numpy as np
import random
import spacy
import torch
from aiengine.base_runner import BaseRunner
from aiengine.settings import TEXT_MODELS as MODELS
Expand Down Expand Up @@ -69,14 +68,6 @@ def generate_response(self, user_query, user_id):
self.conversation_history[user_id] = {'text': conversation_text + user_query + response, 'vector': combined_vector}
return response

def extract_named_entities(self, text):
nlp = spacy.load('en_core_web_sm')
doc = nlp(text)
entities = []
for ent in doc.ents:
entities.append((ent.text, ent.label_))
return entities

@property
def load_in_8bit(self):
return self._load_in_8bit
Expand Down

0 comments on commit fd3ca74

Please sign in to comment.