From 7f24c59e7f753847ad40ddf4bf556b3085e29884 Mon Sep 17 00:00:00 2001 From: Sherif Ahmed Date: Fri, 13 Sep 2024 15:38:28 +0000 Subject: [PATCH] update requirements --- .env.example | 2 ++ Test/request_test.py | 10 +++++----- ToDo.txt | 20 -------------------- requirements.txt | 6 +++++- 4 files changed, 12 insertions(+), 26 deletions(-) create mode 100644 .env.example delete mode 100644 ToDo.txt diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..bddc0de --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +HUGGINGFACEHUB_API_TOKEN="hf_XXXXXXXXX" +PORT=8080 \ No newline at end of file diff --git a/Test/request_test.py b/Test/request_test.py index 56f9578..1675975 100644 --- a/Test/request_test.py +++ b/Test/request_test.py @@ -27,16 +27,16 @@ # TEST Compare Answers -response = requests.post(url="http://127.0.0.1:8080/neuarlearn/ml/CompareAnswers", json=payload_compare_answers) -print(response.json()) +# response = requests.post(url="http://127.0.0.1:8080/neuarlearn/ml/CompareAnswers", json=payload_compare_answers) +# print(response.json()) # TEST Question Generation -# response = requests.post(url="http://127.0.0.1:8080/neuarlearn/ml/QuestionGeneration", json={"transcript":context,"types":[2],"chunk_size":3000,'chunk_overlap':500}) +# response = requests.post(url="http://127.0.0.1:8080/neuarlearn/ml/QuestionGeneration", json={"transcript":context,"types":[1,2,3],"chunk_size":1800,'chunk_overlap':500}) # print(response.json()) # TEST CHATBOT -# response = requests.post(url="http://127.0.0.1:8080/neuarlearn/ml/chat", json=payload) -# print(response.json()) +response = requests.post(url="http://127.0.0.1:8080/neuarlearn/ml/chat", json=payload) +print(response.json()) # TEST Summaizer # response = requests.post(url="http://127.0.0.1:8080/neuarlearn/ml/summaizer", json={"text":context, "min_length": 50, "max_length": 250}) diff --git a/ToDo.txt b/ToDo.txt deleted file mode 100644 index aa543f8..0000000 --- a/ToDo.txt +++ /dev/null @@ -1,20 +0,0 @@ ------------------------------------------------------------------------------------------------------------ -Issues : - - 1. Fix SpacyTextSplitter() case 3 at text_splitter [✅] - 2. Use similarity search without vector database [✅] - 3. find way to save vector database in dask [✅] - ------------------------------------------------------------------------------------------------------------ -ADD: - - 1. Add summaritions model End point. [✅] - 2. Question generation output Parser. [ignore for now] - ------------------------------------------------------------------------------------------------------------ -Experiments: - - 1. Try all types of text splitter. - 2. There are another type of similarity and k experiment. - 3. Try other System prompt. - 4. load model using Transformer library. \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 34ef7a5..12eb801 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,10 @@ peft==0.11.1 pydantic==2.7.3 python-dotenv==1.0.1 Requests==2.32.3 -torch==2.3.0 +torch==2.2.1 transformers==4.39.3 uvicorn==0.30.1 +sentence-transformers +bitsandbytes +spacy +chromadb \ No newline at end of file