update: look at todo
parent
71e7a3c3ec
commit
7c858b2005
|
@ -22,14 +22,11 @@ sys.path.append(str(Path(__file__).parent.parent.parent) + "/utils")
|
||||||
import config
|
import config
|
||||||
import internet
|
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]]:
|
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(
|
results: tuple[list[str], list[str]] = internet.Google(
|
||||||
query, GOOGLE_SEARCH_API_KEY, GOOGLE_SEARCH_ENGINE_ID
|
query, GOOGLE_SEARCH_API_KEY, GOOGLE_SEARCH_ENGINE_ID
|
||||||
).google()
|
).google()
|
||||||
|
|
|
@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "internet-ml"
|
name = "internet-ml"
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
description = "Internet-ML: Allowing ML to connect to the internet"
|
description = "Internet-ML: Allowing ML to connect to the internet"
|
||||||
readme = "./.github/README.md"
|
readme = "./.github/README.md"
|
||||||
authors = ["Thamognya Kodi <contact@thamognya.com>"]
|
authors = ["Thamognya Kodi <contact@thamognya.com>"]
|
||||||
|
|
Loading…
Reference in New Issue