|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "code", |
5 | | - "execution_count": 11, |
| 5 | + "execution_count": 1, |
6 | 6 | "id": "cc93a668", |
7 | 7 | "metadata": {}, |
8 | 8 | "outputs": [ |
9 | | - { |
10 | | - "name": "stderr", |
11 | | - "output_type": "stream", |
12 | | - "text": [ |
13 | | - "None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.\n" |
14 | | - ] |
15 | | - }, |
16 | 9 | { |
17 | 10 | "data": { |
18 | 11 | "application/vnd.jupyter.widget-view+json": { |
19 | | - "model_id": "daa35a202b9944a981d2163df1c63c60", |
| 12 | + "model_id": "5bd625018f6247fab661ce6d838cb40c", |
20 | 13 | "version_major": 2, |
21 | 14 | "version_minor": 0 |
22 | 15 | }, |
23 | 16 | "text/plain": [ |
24 | | - "Downloading: 0%| | 0.00/1.04M [00:00<?, ?B/s]" |
25 | | - ] |
26 | | - }, |
27 | | - "metadata": {}, |
28 | | - "output_type": "display_data" |
29 | | - }, |
30 | | - { |
31 | | - "data": { |
32 | | - "application/vnd.jupyter.widget-view+json": { |
33 | | - "model_id": "bebdf1cab3a0459d8287208bd0923907", |
34 | | - "version_major": 2, |
35 | | - "version_minor": 0 |
36 | | - }, |
37 | | - "text/plain": [ |
38 | | - "Downloading: 0%| | 0.00/456k [00:00<?, ?B/s]" |
39 | | - ] |
40 | | - }, |
41 | | - "metadata": {}, |
42 | | - "output_type": "display_data" |
43 | | - }, |
44 | | - { |
45 | | - "data": { |
46 | | - "application/vnd.jupyter.widget-view+json": { |
47 | | - "model_id": "292dc7fa30e14ed29d3fd1c547a1c121", |
48 | | - "version_major": 2, |
49 | | - "version_minor": 0 |
50 | | - }, |
51 | | - "text/plain": [ |
52 | | - "Downloading: 0%| | 0.00/1.36M [00:00<?, ?B/s]" |
53 | | - ] |
54 | | - }, |
55 | | - "metadata": {}, |
56 | | - "output_type": "display_data" |
57 | | - }, |
58 | | - { |
59 | | - "data": { |
60 | | - "application/vnd.jupyter.widget-view+json": { |
61 | | - "model_id": "c8b65b559f5e42dc9c3015181358047b", |
62 | | - "version_major": 2, |
63 | | - "version_minor": 0 |
64 | | - }, |
65 | | - "text/plain": [ |
66 | | - "Downloading: 0%| | 0.00/665 [00:00<?, ?B/s]" |
| 17 | + "Downloading: 0%| | 0.00/26.0 [00:00<?, ?B/s]" |
67 | 18 | ] |
68 | 19 | }, |
69 | 20 | "metadata": {}, |
|
139 | 90 | }, |
140 | 91 | { |
141 | 92 | "cell_type": "code", |
142 | | - "execution_count": 12, |
| 93 | + "execution_count": 2, |
143 | 94 | "id": "e158174f", |
144 | 95 | "metadata": {}, |
145 | 96 | "outputs": [], |
146 | 97 | "source": [ |
147 | 98 | "stop_words = set(stopwords.words(\"english\"))\n", |
148 | 99 | "\n", |
149 | | - "try:\n", |
150 | | - " # this takes a while to load\n", |
151 | | - " import en_core_web_lg\n", |
| 100 | + "if 1==2:\n", |
| 101 | + " try:\n", |
| 102 | + " # this takes a while to load\n", |
| 103 | + " import en_core_web_lg\n", |
152 | 104 | "\n", |
153 | | - " nlp = en_core_web_lg.load()\n", |
154 | | - "except:\n", |
155 | | - " print(\"Downloading word2vec model en_core_web_lg\")\n", |
156 | | - " import subprocess\n", |
| 105 | + " nlp = en_core_web_lg.load()\n", |
| 106 | + " except:\n", |
| 107 | + " print(\"Downloading word2vec model en_core_web_lg\")\n", |
| 108 | + " import subprocess\n", |
157 | 109 | "\n", |
158 | | - " bashCommand = \"python -m spacy download en_core_web_lg\"\n", |
159 | | - " process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE)\n", |
160 | | - " output, error = process.communicate()\n", |
161 | | - " print(f\"output of word2vec model download: {str(output)}\")\n", |
162 | | - " import en_core_web_lg\n", |
| 110 | + " bashCommand = \"python -m spacy download en_core_web_lg\"\n", |
| 111 | + " process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE)\n", |
| 112 | + " output, error = process.communicate()\n", |
| 113 | + " print(f\"output of word2vec model download: {str(output)}\")\n", |
| 114 | + " import en_core_web_lg\n", |
163 | 115 | "\n", |
164 | | - " nlp = en_core_web_lg.load()\n", |
| 116 | + " nlp = en_core_web_lg.load()\n", |
165 | 117 | "\n", |
166 | | - "passivepy = PassivePy.PassivePyAnalyzer(nlp=nlp)" |
| 118 | + " passivepy = PassivePy.PassivePyAnalyzer(nlp=nlp)" |
167 | 119 | ] |
168 | 120 | }, |
169 | 121 | { |
|
198 | 150 | "jurisdictions = load(\"../formfyxer/data/jurisdictions.joblib\")\n", |
199 | 151 | "groups = load(\"../formfyxer/data/groups.joblib\")\n", |
200 | 152 | "clf_field_names = load(\"../formfyxer/data/clf_field_names.joblib\")\n", |
| 153 | + "with open(\"../../keys/tools_token.txt\", \"r\") as file:\n", |
| 154 | + " tools_token = file.read().rstrip()\n", |
201 | 155 | "with open(\"../../keys/spot_token.txt\", \"r\") as file:\n", |
202 | 156 | " spot_token = file.read().rstrip()\n", |
203 | 157 | "with open(\"../../keys/openai_org.txt\", \"r\") as file:\n", |
|
3045 | 2999 | ], |
3046 | 3000 | "metadata": { |
3047 | 3001 | "kernelspec": { |
3048 | | - "display_name": "Python 3.8.10 64-bit", |
| 3002 | + "display_name": "Python 3 (ipykernel)", |
3049 | 3003 | "language": "python", |
3050 | 3004 | "name": "python3" |
3051 | 3005 | }, |
|
3059 | 3013 | "name": "python", |
3060 | 3014 | "nbconvert_exporter": "python", |
3061 | 3015 | "pygments_lexer": "ipython3", |
3062 | | - "version": "3.8.10" |
| 3016 | + "version": "3.8.12" |
3063 | 3017 | }, |
3064 | 3018 | "vscode": { |
3065 | 3019 | "interpreter": { |
|
0 commit comments