|
92 | 92 | "cell_type": "code", |
93 | 93 | "execution_count": null, |
94 | 94 | "metadata": {}, |
95 | | - "outputs": [ |
96 | | - { |
97 | | - "name": "stderr", |
98 | | - "output_type": "stream", |
99 | | - "text": [ |
100 | | - "INFO:python.content_understanding_client:Analyzer content-doc-sample-f79b4605-4990-4788-ba6a-47d55d244212 create request accepted.\n", |
101 | | - "INFO:python.content_understanding_client:Request result is ready after 0.00 seconds.\n", |
102 | | - "INFO:python.content_understanding_client:Analyzing file ../data/purchase_order.jpg with analyzer: content-doc-sample-f79b4605-4990-4788-ba6a-47d55d244212\n", |
103 | | - "INFO:python.content_understanding_client:Request 6c1f5fea-8f2e-423b-afbe-cd35872379f6 in progress ...\n", |
104 | | - "INFO:python.content_understanding_client:Request 6c1f5fea-8f2e-423b-afbe-cd35872379f6 in progress ...\n", |
105 | | - "INFO:python.content_understanding_client:Request result is ready after 4.56 seconds.\n" |
106 | | - ] |
107 | | - }, |
108 | | - { |
109 | | - "name": "stdout", |
110 | | - "output_type": "stream", |
111 | | - "text": [ |
112 | | - "{\n", |
113 | | - " \"id\": \"6c1f5fea-8f2e-423b-afbe-cd35872379f6\",\n", |
114 | | - " \"status\": \"Succeeded\",\n", |
115 | | - " \"result\": {\n", |
116 | | - " \"analyzerId\": \"content-doc-sample-f79b4605-4990-4788-ba6a-47d55d244212\",\n", |
117 | | - " \"apiVersion\": \"2024-12-01-preview\",\n", |
118 | | - " \"createdAt\": \"2024-12-10T23:29:52Z\",\n", |
119 | | - " \"warnings\": [],\n", |
120 | | - " \"contents\": [\n", |
121 | | - " {\n", |
122 | | - " \"markdown\": \"Purchase Order\\n\\n\\n# Hero Limited\\n\\nCompany Phone: 555-348-6512\\nWebsite: www.herolimited.com\\nEmail:\\naccounts@herolimited.com\\n\\nPurchase Order\\n\\nDated As: 12/20/2020\\nPurchase Order #: 948284\\n\\nShipped To\\n\\nVendor Name: Hillary Swank\\nCompany Name: Higgly Wiggly Books\\nAddress: 938 NE Burner Road\\nBoulder City, CO 92848\\nPhone: 938-294-2949\\n\\nShipped From\\n\\nName: Bernie Sanders\\nCompany Name: Jupiter Book Supply\\nAddress: 383 N Kinnick Road\\nSeattle, WA 38383\\n\\nPhone: 932-299-0292\\n\\n\\n<table>\\n<tr>\\n<th>Details</th>\\n<th>Quantity</th>\\n<th>Unit Price</th>\\n<th>Total</th>\\n</tr>\\n<tr>\\n<td>Bindings</td>\\n<td>20</td>\\n<td>1.00</td>\\n<td>20.00</td>\\n</tr>\\n<tr>\\n<td>Covers Small</td>\\n<td>20</td>\\n<td>1.00</td>\\n<td>20.00</td>\\n</tr>\\n<tr>\\n<td>Feather Bookmark</td>\\n<td>20</td>\\n<td>5.00</td>\\n<td>100.00</td>\\n</tr>\\n<tr>\\n<td>Copper Swirl Marker</td>\\n<td>20</td>\\n<td>5.00</td>\\n<td>100.00</td>\\n</tr>\\n</table>\\n\\n\\n<table>\\n<tr>\\n<td>SUBTOTAL</td>\\n<td>$140.00</td>\\n</tr>\\n<tr>\\n<td>TAX</td>\\n<td>$4.00</td>\\n</tr>\\n<tr>\\n<td>TOTAL</td>\\n<td>$144.00</td>\\n</tr>\\n</table>\\n\\n\\nBernie Sanders\\n\\nBernie Sanders\\nManager\\n\\nAdditional Notes:\\n\\nDo not Jostle Box. Unpack carefully. Enjoy.\\n\\nJupiter Book Supply will refund you 50% per book if returned within 60 days of reading and\\n\\noffer you 25% off you next total purchase.\\n\",\n", |
123 | | - " \"kind\": \"document\",\n", |
124 | | - " \"startPageNumber\": 1,\n", |
125 | | - " \"endPageNumber\": 1,\n", |
126 | | - " \"unit\": \"pixel\",\n", |
127 | | - " \"pages\": [\n", |
128 | | - " {\n", |
129 | | - " \"pageNumber\": 1,\n", |
130 | | - " \"angle\": 0.05652412,\n", |
131 | | - " \"width\": 1700,\n", |
132 | | - " \"height\": 2200\n", |
133 | | - " }\n", |
134 | | - " ]\n", |
135 | | - " }\n", |
136 | | - " ]\n", |
137 | | - " }\n", |
138 | | - "}\n" |
139 | | - ] |
140 | | - } |
141 | | - ], |
| 95 | + "outputs": [], |
142 | 96 | "source": [ |
143 | 97 | "ANALYZER_ID = \"content-doc-sample-\" + str(uuid.uuid4())\n", |
144 | 98 | "ANALYZER_TEMPLATE_FILE = '../analyzer_templates/content_document.json'\n", |
|
181 | 135 | "outputs": [], |
182 | 136 | "source": [ |
183 | 137 | "ANALYZER_ID = \"content-audio-sample-\" + str(uuid.uuid4())\n", |
184 | | - "ANALYZER_TEMPLATE_FILE = '../analyzer_templates/audio_transcript.json'\n", |
185 | | - "ANALYZER_SAMPLE_FILE = '../data/audio.wav'\n", |
| 138 | + "ANALYZER_TEMPLATE_FILE = '../analyzer_templates/call_recording_analytics.json'\n", |
| 139 | + "ANALYZER_SAMPLE_FILE = '../data/callCenterRecording.mp3'\n", |
186 | 140 | "\n", |
187 | 141 | "# Create analyzer\n", |
188 | 142 | "response = client.begin_create_analyzer(ANALYZER_ID, analyzer_template_path=ANALYZER_TEMPLATE_FILE)\n", |
|
343 | 297 | "name": "python", |
344 | 298 | "nbconvert_exporter": "python", |
345 | 299 | "pygments_lexer": "ipython3", |
346 | | - "version": "3.11.11" |
| 300 | + "version": "3.11.10" |
347 | 301 | } |
348 | 302 | }, |
349 | 303 | "nbformat": 4, |
|
0 commit comments