From ec6a2d42ef6fa21c199383d6b173551eacca4e43 Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Thu, 14 Dec 2023 14:54:47 -0800 Subject: [PATCH] cleanup imports and dependencies --- ai_ta_backend/filtering_contexts.py | 4 ++-- ai_ta_backend/main.py | 3 +++ requirements.txt | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ai_ta_backend/filtering_contexts.py b/ai_ta_backend/filtering_contexts.py index 9566fb60..0db4e336 100644 --- a/ai_ta_backend/filtering_contexts.py +++ b/ai_ta_backend/filtering_contexts.py @@ -5,10 +5,10 @@ import openai import ray -import replicate import requests from langchain import hub -from transformers import AutoTokenizer +# import replicate +# from transformers import AutoTokenizer # load_dotenv(override=True) # tokenizer = AutoTokenizer.from_pretrained("HuggingFaceH4/zephyr-7b-beta") diff --git a/ai_ta_backend/main.py b/ai_ta_backend/main.py index cf615833..450c92be 100644 --- a/ai_ta_backend/main.py +++ b/ai_ta_backend/main.py @@ -8,6 +8,7 @@ from flask import Flask, Response, abort, jsonify, request from flask_cors import CORS from flask_executor import Executor +import ray from sqlalchemy import JSON from ai_ta_backend.nomic_logging import get_nomic_map, log_convo_to_nomic @@ -23,6 +24,8 @@ # load API keys from globally-availabe .env file load_dotenv() +ray.init() + @app.route('/') def index() -> Response: """_summary_ diff --git a/requirements.txt b/requirements.txt index 3f85dac5..7f17ca4f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -55,5 +55,4 @@ unstructured==0.10.29 # causes huge ~5.3 GB of installs. Probbably from onnx: ht xlrd # for excel ingest newrelic ray -langchainhub -replicate \ No newline at end of file +langchainhub \ No newline at end of file