diff --git a/internet_ml/NLP/no_context/QA.py b/internet_ml/NLP/no_context/QA.py index a50e320..50ffc45 100644 --- a/internet_ml/NLP/no_context/QA.py +++ b/internet_ml/NLP/no_context/QA.py @@ -22,14 +22,11 @@ sys.path.append(str(Path(__file__).parent.parent.parent) + "/utils") import config import internet -GOOGLE_SEARCH_API_KEY = str(os.environ["INTERNET_ML_GOOGLE_API"]) -GOOGLE_SEARCH_ENGINE_ID = str(os.environ["INTERNET_ML_GOOGLE_SEARCH_ENGINE_ID"]) - -QA_MODEL: Any = pipeline("question-answering") - def answer(query: str) -> tuple[Any, list[str]]: - global QA_MODEL + QA_MODEL: Any = pipeline("question-answering") + GOOGLE_SEARCH_API_KEY = str(os.environ["INTERNET_ML_GOOGLE_API"]) + GOOGLE_SEARCH_ENGINE_ID = str(os.environ["INTERNET_ML_GOOGLE_SEARCH_ENGINE_ID"]) results: tuple[list[str], list[str]] = internet.Google( query, GOOGLE_SEARCH_API_KEY, GOOGLE_SEARCH_ENGINE_ID ).google() diff --git a/pyproject.toml b/pyproject.toml index b08f60f..d585e85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "internet-ml" -version = "1.0.0" +version = "1.0.1" description = "Internet-ML: Allowing ML to connect to the internet" readme = "./.github/README.md" authors = ["Thamognya Kodi "]