276 строки
26 KiB
Plaintext
276 строки
26 KiB
Plaintext
{
|
||
"cells": [
|
||
{
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"# Test Inference"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"## Local"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 1,
|
||
"metadata": {},
|
||
"outputs": [],
|
||
"source": [
|
||
"%load_ext autoreload\n",
|
||
"%autoreload 2"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 2,
|
||
"metadata": {},
|
||
"outputs": [],
|
||
"source": [
|
||
"import json"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 3,
|
||
"metadata": {},
|
||
"outputs": [],
|
||
"source": [
|
||
"import os\n",
|
||
"os.chdir('../')"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 16,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"name": "stderr",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"I0110 14:32:14.088067 33948 custom.py:19] [INFO] Project Target Language **en**\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"# Custom Functions\n",
|
||
"import sys\n",
|
||
"sys.path.append('./code')\n",
|
||
"import infer"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 17,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"name": "stderr",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"I0110 14:32:28.000769 33948 infer.py:49] [INFO] Unpacked model assets.\n",
|
||
"I0110 14:32:28.208767 33948 utils.py:65] device: cpu n_gpu: 0, distributed training: False, automatic mixed precision training: None\n",
|
||
"I0110 14:32:28.221772 33948 modeling_utils.py:403] loading weights file C:\\Users\\makayser\\Desktop\\nlp_local\\model_type-len-t1\\language_model.bin\n",
|
||
"I0110 14:32:32.836766 33948 adaptive_model.py:273] Found files for loading 1 prediction heads\n",
|
||
"I0110 14:32:32.840770 33948 prediction_head.py:244] Using class weights for task 'text_classification': [1.9056895485466914, 0.43022687609075044, 6.626881720430108]\n",
|
||
"I0110 14:32:32.845772 33948 prediction_head.py:113] Loading prediction head from C:\\Users\\makayser\\Desktop\\nlp_local\\model_type-len-t1\\prediction_head_0.bin\n",
|
||
"I0110 14:32:33.053766 33948 tokenization_utils.py:327] Model name 'C:\\Users\\makayser\\Desktop\\nlp_local\\model_type-len-t1' not found in model shortcut name list (roberta-base, roberta-large, roberta-large-mnli, distilroberta-base, roberta-base-openai-detector, roberta-large-openai-detector). Assuming 'C:\\Users\\makayser\\Desktop\\nlp_local\\model_type-len-t1' is a path or url to a directory containing tokenizer files.\n",
|
||
"I0110 14:32:33.058767 33948 tokenization_utils.py:395] loading file C:\\Users\\makayser\\Desktop\\nlp_local\\model_type-len-t1\\vocab.json\n",
|
||
"I0110 14:32:33.061769 33948 tokenization_utils.py:395] loading file C:\\Users\\makayser\\Desktop\\nlp_local\\model_type-len-t1\\merges.txt\n",
|
||
"I0110 14:32:33.064769 33948 tokenization_utils.py:395] loading file C:\\Users\\makayser\\Desktop\\nlp_local\\model_type-len-t1\\added_tokens.json\n",
|
||
"I0110 14:32:33.067769 33948 tokenization_utils.py:395] loading file C:\\Users\\makayser\\Desktop\\nlp_local\\model_type-len-t1\\special_tokens_map.json\n",
|
||
"I0110 14:32:33.069769 33948 tokenization_utils.py:395] loading file C:\\Users\\makayser\\Desktop\\nlp_local\\model_type-len-t1\\tokenizer_config.json\n",
|
||
"I0110 14:32:33.338767 33948 processor.py:443] Initialized processor without tasks. Supply `metric` and `label_list` to the constructor for using the default task or add a custom task later via processor.add_task()\n",
|
||
"I0110 14:32:33.340772 33948 utils.py:65] device: cpu n_gpu: 0, distributed training: False, automatic mixed precision training: None\n",
|
||
"I0110 14:32:34.846776 33948 prepare.py:80] [WARNING] No stopwords list loaded.\n",
|
||
"I0110 14:32:34.849770 33948 prepare.py:81] [INFO] Stopwords list lenght: 5713\n",
|
||
"I0110 14:32:35.030770 33948 infer.py:61] [INFO] Loaded model and prepare steps for task 1.\n"
|
||
]
|
||
},
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"2020-01-10 14:32:35,669 loading file C:\\Users\\makayser\\.flair\\models\\en-ner-ontonotes-fast-v0.4.pt\n"
|
||
]
|
||
},
|
||
{
|
||
"name": "stderr",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"I0110 14:32:51.538770 33948 prepare.py:80] [WARNING] No stopwords list loaded.\n",
|
||
"I0110 14:32:51.558771 33948 prepare.py:81] [INFO] Stopwords list lenght: 5713\n",
|
||
"I0110 14:32:51.785770 33948 infer.py:61] [INFO] Loaded model and prepare steps for task 3.\n",
|
||
"I0110 14:32:52.363771 33948 prepare.py:80] [WARNING] No stopwords list loaded.\n",
|
||
"I0110 14:32:52.366774 33948 prepare.py:81] [INFO] Stopwords list lenght: 5713\n",
|
||
"I0110 14:32:53.235769 33948 prepare.py:80] [WARNING] No stopwords list loaded.\n",
|
||
"I0110 14:32:53.240773 33948 prepare.py:81] [INFO] Stopwords list lenght: 5713\n",
|
||
"I0110 14:32:53.385768 33948 infer.py:61] [INFO] Loaded model and prepare steps for task 4.\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"infer.init(local=True)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 19,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"name": "stderr",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"I0110 14:38:21.067881 33948 infer.py:179] Got ya 1 parallel workers to do inference on 1dicts (chunksize = 128)...\n",
|
||
"I0110 14:38:21.073890 33948 utils.py:228] 0 \n",
|
||
"I0110 14:38:21.077884 33948 utils.py:228] /w\\\n",
|
||
"I0110 14:38:21.082884 33948 utils.py:228] / \\\n",
|
||
"I0110 14:38:21.086884 33948 utils.py:228] \n",
|
||
" 0%| | 0/1 [00:00<?, ? Dicts/s]\n",
|
||
"Inferencing: 0%| | 0/1 [00:00<?, ?it/s]\n",
|
||
"Inferencing: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2.00it/s]\n",
|
||
"128 Dicts [00:04, 25.94 Dicts/s] \n",
|
||
"I0110 14:38:26.627403 33948 rank.py:52] [INFO] Reduced answer selection to 628 from 1088.\n"
|
||
]
|
||
},
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"[{'task': 1, 'params': {'label': 'subcat', 'type': 'classification', 'language': 'en', 'prepare': None}, 'result': 'windows'}, {'task': 3, 'params': {'type': 'ner', 'language': 'en', 'prepare': None}, 'result': [{'value': 'Martin', 'start': 116, 'end': 122, 'label': 'PERSON'}, {'value': 'Microsoft', 'start': 149, 'end': 158, 'label': 'ORG'}]}, {'task': 4, 'params': {'type': 'qa', 'language': 'en', 'prepare': None}, 'result': [{'question_clean': 'touchpad stop work optical mouse install be run window 7 compaq presario cq61 212tu go start external notebook optical mouse touchpad win t work laptop take 25mins boot shutdown try obvious like uninstalling mouse basically win t uninstall be kinda stick appreciate help', 'answer_text_clean': 'Hi freakyfairy, a. Have you tried unplugging the external mouse and checked if touchpad works fine? The touchpad could have been disabled after connecting the external mouse. You may have to enable the same again from Control Panel. To enable touchpad, 1. Click Start and select Control Panel . 2. Select Mouse. 3. Click Device Settings. 4. Select the touchpad device. 5. Click Enable. Note: The above steps are generic to any laptop model. Settings may vary for your laptop model. If enabling touchpad does not help, you may go ahead and uninstall the Synaptics touchpad drivers and re-install the same again. To uninstall Synaptics touchpad drivers, 1. Click Start , type Device Manager in the Start search box and hit Enter. 2. Locate Mice and other pointing devices and expand the same. 3. Right-click the Synaptics driver and select uninstall . 4. Restart the computer, if prompted. You may download and install the latest Synaptics Touchpad drivers from the following link: http://h10025.www1.hp.com/ewfrf/wc/softwareList?os=4062&lc=en&dlc=en&cc=us&lang=en&product=3999824 Download the Synaptics TouchPad Driver listed under “Driver - Keyboard, Mouse and Input Devices”. Note: Make sure you download and save the TouchPad driver before uninstalling the same. With respect to the issue concerning the laptop taking up a longer time to boot up, I’d suggest you to put the laptop in a clean boot state and troubleshoot the issue accordingly. Putting your system in clean boot state helps in identifying if any third party applications or startup items are causing the issue. If yes, you may have to contact the program manufacturer for any updates or uninstall and re-install the program. Refer the following Microsoft KB article for more information on how to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7: How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7 http://support.microsoft.com/kb/929135 Hope this helps. Gokul - Microsoft Support [If this post was helpful, please click the \"Vote as Helpful\" (green triangle) button. If it helps in resolving your issue, click \"Propose As Answer\" or \"Mark as Answer\" button. By proposing/marking a post as Answered, or Helpful you help others find the answer faster.]', 'appliesTo': 'windows,Windows 7,Devices & drivers', 'score': '16.95'}, {'question_clean': 'event id pns microsoft windows kernel power server pnl hard reboot pnl server boot see red flag event log computername 41 critical microsoft windows kernel power system 5 pns pnl 2 pns 38 pm understand hard reboot cause event log clear properly restart server thrice event server work application couldn t ignore red flag notification', 'answer_text_clean': 'Hi, The issue you posted would be better suited in the TechNet community. Please visit the link below to find a community that will offer the support you request. http://social.technet.microsoft.com/Forums/en-US/category/windowsserver Hope this information is helpful.', 'appliesTo': 'windows,Windows 8,Performance & system failures', 'score': '15.78'}, {'question_clean': 'windows pns win t boot win t recover win t reset win t repair install win pns 32bit work update unblocked update run laptop reboot bootloader load tried windows pns recovery medium usb follow fix work refresh pc reset pc open system restore point restore point start repair previous build clean installation fail win t format partition upgrade installation fail despite file visible computer command prompt chkdsk f r show 696e647863686b2e pnl error bcdedit fix haven t work startup repair fail say s wrong os s version have download win pns recovery medium twice try win 8 recovery usb result look like bootloader corr', 'answer_text_clean': \"I know this issue seems huge and like you'going to loose everything but its not and you wont I promise. Get ready for the worlds simplest fix to this issue. Start your pc and use the F11 to boot into recovery mode. Next select Advanced and then Command prompt. From here run chkdsk c: /r /x and watch the magic work. If chkdsk only scans you will need to run sfc /scannow and reboot. Problem solved! Windows cannot repair its self because the boot parameter is corrupt and no recovery will fix it for some reason but the tools you need are all already there. Don't be fooled into thinking a complete system restore is needed. That is the blind troubleshooting with a shotgun in the dark. I hope I saved you some trouble.\", 'appliesTo': 'windows,Windows 10,Windows update, recovery, & backup,PC', 'score': '15.33'}]}]\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"en = infer.run(json.dumps([{\"subject\":\"My pc won't start, I work with Apple.\", \n",
|
||
" \"body\":\"When I try booting, a red light goes on and then nothing happens. My name is Martin and i work for Microsoft. Microsoft is great.\",\n",
|
||
" \"attachment\":\"\"\n",
|
||
" }]))\n",
|
||
"print(en)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 15,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"'[{\"task\": 1, \"params\": {\"label\": \"subcat\", \"type\": \"classification\", \"language\": \"de\", \"prepare\": null}, \"result\": \"xbox\"}, {\"task\": 3, \"params\": {\"type\": \"ner\", \"language\": \"de\", \"prepare\": null}, \"result\": [{\"value\": \"Martin\", \"start\": 96, \"end\": 102, \"label\": \"PER\"}]}, {\"task\": 4, \"params\": {\"type\": \"qa\", \"language\": \"de\", \"prepare\": null}, \"result\": [{\"question_clean\": \"xbox gamertag fixed back pnl i got myself xbox pns some time later i made myself account and random name as applied to it now pnl when decided i wanted to change name to real username and not just some nonsense i get to know that i ve already used free gamertag change never life have i changed username on xbox any sudgestions on how to fixen this yes i know i just buy gamertag change thingy but for me paying pns for something others get for free is just stupid\", \"answer_text_clean\": \"With the recent update to the gamertag system, you do have a free change available. https://support.xbox.com/my-account/manage-gamertag-and-profile/gamertag-updates-faq You would need to go to https://social.xbox.com/changegamertag to change it.\", \"appliesTo\": \"xbox,Accessibility\", \"score\": \"27.77\"}, {\"question_clean\": \"unlinking activision accounts for call of duty modern warfare is there way to unlink gamertag from activision account on the microsoft side the option to do it on the activision site no longer works when you click on unlink it says unlinking is not available for this platform and when on the account setting tab while the actual game it says to contact call of duty activision support but they have been completely unresponsive and their customer service phone number just redirects you back to the website background of situation boyfriend played the beta on xbox and linked his existing activision account to gamertag for the actual launch of the game he bought it for pc and i have it on xbox we crossplay together however i t play on the xbox because gamertag is linked to his account from the beta i t create new activision account because when entering microsoft account it just redirects to his existing account i ve seen\", \"answer_text_clean\": \"Unfortunately, there doesn\\'t seem to be a fix right now. However, have you tried looking on the Activision forums? They would have the most up-to-date news on this.\", \"appliesTo\": \"xbox,Games and Apps\", \"score\": \"27.23\"}, {\"question_clean\": \"modern warfare broke party chat my xbox one x system has been working for over year never had issues connecting to parties nat always open good connection no matchmaking issues the moment modern warfare game download finished i disconnected from the xbox live party and i have not been able to connect to any parties since i didnt even start load the game my nat type is unavailable and i m getting cant get teredo ip address error when i check multiplayer connection i have hard reset xbox left entire set up unplugged without power overnight uninstalled the game factory reset xbox factory reset gateway verified all necessary ports are open verified all other network settings are setup to allow open nat as they always have been spun around circle 3 times done the hokey pokey and i stillen cant connect to party i have no problems connecting to online multiplayer games and have been able to use the xbox app on phone to join part\", \"answer_text_clean\": \"Hi Go to Settings > Network Settings > Advanced settings > Alternate port selection > Manual, and chose another random port. if it comes back unavailable just try and find a port that is either open or moderate. If it moderate try running a Nat test and hopefully that turns it to open. And try again if that doesn\\'t work try the next steps. Also try to change the Dns settings to do this GO TO1. Network Settings2. Advanced Settings3. DNS Settings4. Select Manual5. Change Primary DNS address to 8.8.8.86. Change Secondary DNS address to 8.8.4.47. Now go back and it will say \\\\\"It\\'s all good, Your console is connected to the internet\\\\\"And for me my NAT went immediately to OPEN give it a try hope this helps!Also try to hard restart the xbox one this will clear any cache as well. To do this hold the power button on the xbox for 10 seconds till it shuts down remove the wire wait another 10 secs and turn it back on and try again.If that doesn\\'t fix it try resetting your mac address go to Settings>Network>Advanced>AlternateMAC>Clear restart your xbox and try againhope it helps,\", \"appliesTo\": \"xbox,Xbox on Consoles\", \"score\": \"24.18\"}]}]'"
|
||
]
|
||
},
|
||
"execution_count": 15,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"json.dumps(en)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 9,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"name": "stderr",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"I0110 13:33:14.518476 33948 infer.py:179] Got ya 1 parallel workers to do inference on 1dicts (chunksize = 128)...\n",
|
||
"I0110 13:33:14.523477 33948 utils.py:228] 0 \n",
|
||
"I0110 13:33:14.526477 33948 utils.py:228] /w\\\n",
|
||
"I0110 13:33:14.528476 33948 utils.py:228] / \\\n",
|
||
"I0110 13:33:14.531477 33948 utils.py:228] \n",
|
||
" 0%| | 0/1 [00:00<?, ? Dicts/s]\n",
|
||
"Inferencing: 0%| | 0/1 [00:00<?, ?it/s]\n",
|
||
"Inferencing: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 3.91it/s]\n",
|
||
"128 Dicts [00:05, 24.75 Dicts/s] \n",
|
||
"I0110 13:33:20.128999 33948 rank.py:52] [INFO] Reduced answer selection to 15 from 240.\n"
|
||
]
|
||
},
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"[{'task': 1, 'params': {'label': 'subcat', 'type': 'classification', 'language': 'de', 'prepare': None}, 'result': 'windows'}, {'task': 3, 'params': {'type': 'ner', 'language': 'de', 'prepare': None}, 'result': [{'value': 'Windows 7', 'start': 5, 'end': 14, 'label': 'MISC'}, {'value': 'Microsoft', 'start': 59, 'end': 68, 'label': 'ORG'}, {'value': 'Bill', 'start': 85, 'end': 89, 'label': 'PER'}, {'value': 'Windows 7', 'start': 1, 'end': 3, 'label': 'Product'}]}, {'task': 4, 'params': {'type': 'qa', 'language': 'de', 'prepare': None}, 'result': [{'question_clean': 'windows update avast update windows pns version pnl grund fehlermeldung bzgl avast durchführen avast windowsmenue avasttool aktuell version alt avast installation versuchen deinstalliert sorgen jeweils abgesichert modus systemsteuerung avast listen deinstallationstool deinstallieren windowsliste fehlermeldung bleiben ahnung rechner idee verstehen umsetzen', 'answer_text_clean': 'Ich habe alles ausprobiert, alles erfolglos. Bis ich gerade eine Lösung gefunden habe und zwar folgende:Avast mit Avastclear im abgesicherten Modus deinstallieren.Rechner neustarten.Alte Version (z.B. 10.0.14393.591) vom MediaCreationTool herunterladen und starten - gleichzeitig die Internetverbindung trennen (am besten das LAN-Kabel rausziehen).Die Hinweise beachten und die Installation fortführen. Bei der Frage, ob man die persönlichen Dateien und Programme beibehalten möchte, bestätigen.Der PC fährt selbstständig ein paar Mal hoch und runter.Nachdem das Betriebssytem installiert wurde, die Internetverbindung wiederherstellen und in den Einstellungen nach Windows-Updates suchen (sind \\'ne ganze Menge).Die Idee war eigentlich ganz simpel. Indem man die alte Version vom MediaCreationTool bzw. Win10 installiert, \"weiß\" der Rechner noch nicht, dass Avast \"in Zukunft\" das Betriebssystem schrotten wird . Somit ist Avast noch nicht auf der schwarzen Liste. Die Internetverbindung muss vor der Installation getrennt werden, da das MediaCreationTool nach Updates sucht, bevor es mit der Installation beginnt, die möglicherweise die Installation mit den einzelnen versteckten Avast-Dateien verhindern.', 'appliesTo': 'windows,Windows 10,Windows-Update, -Wiederherstellung und -Sicherung', 'score': '5.48'}, {'question_clean': 'windows 7 x64 pro update automatische update funktionieren informieren windows update update windows 7 x64 basieren system pu 7 installationsdatum \\u200e13 \\u200e10 \\u200e2016 pns 27installationsstatus erfolgreichdie office updates update microsoft project pnl pu 9 pns bit editionund updates office programmeinstallationsdatum \\u200e08 \\u200e11 \\u200e2016 pns 15aus unerfindlichen grund finden automatisch updates manuelle update laufen endlos fortschreiten anzeige übertragen updates wüsste update hoffen vorgeschlagen alternativ pu laufen endlos testprogramm liefern fehler installationsprogramm per vorgehen sicherheitsrelevant updates automatische update gang', 'answer_text_clean': \"Wolfgang,gehe Schritt für Schritt nach folgender Anleitung vor und lass' mich wissen, obs klappt oder an irgendeiner Stelle zu Fragen kommt.Verhindern, dass Windows automatisch nach Updates sucht:Klick in der Systemsteuerung auf System und SicherheitIm Abschnitt Windows Update auf Automatische Updates aktivieren oder deaktivieren klickenIm folgenden Fenster links auf Einstellungen ändern klickenNotiere, welche Einstellungen gesetzt sind, um diese später wieder herzustellen.Ändere den Wert auf Nicht nach Updates suchen (nicht empfohlen)Klick auf OK & PC neu startenUpdates installieren:Installiere KB3177467 (Servicing Stack)Installiere KB3172605 (Juli 2016 Rollup für aktuellen Windows Update Agent)PC neu startenErneut nach Aktualisierungen suchen:In der Systemsteuerung Klick auf System und SicherheitKlick auf Windows Update > Nach Updates suchenIn der Regel muss nun nicht länger als 15 Minuten gewartet werdenLass' mich wissen, obs funktioniert,dein Microsoft-Support.\", 'appliesTo': 'windows,', 'score': '4.72'}, {'question_clean': 'windows pns laufen rechner heißen windows pns laufen rechner heißen teilweise pns grad windows tasten windows web durchsuchen funktionieren handeln notebook 4 gb arbeitsspeicher servicepaket 1 installieren', 'answer_text_clean': 'Ich bereue es das ich mein WIn7 durch WIN10 ersetzt habe. Ich habe am Anfang gedacht das sich das ganze legen wird aber vergbelich. inzwischen überlege ich irgendwo eine Win7 Version wieder zu kaufen da ich kein Recovery mehr durchführen kann. Also an alle die keine Lust auf heiß laufende Akkus, ohne Pause laufende Lüfter und wenig mit wenig Leistung zufrieden geben müssen lasst die finger WIN10 das ist purer desaster und erinnert mich sehr stark an die Einführung VISTA.', 'appliesTo': 'windows,Windows 10,Installation, Upgrade und Aktivierung,PC', 'score': '4.56'}]}]\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"de = infer.run(json.dumps([{\"subject\":\"Mein Windows 7 rechner will nicht mehr.\", \n",
|
||
" \"body\":\"Ich habe versucht Microsoft anzurufen, aber Bill hebt nicht ab.\",\n",
|
||
" \"attachment\":\"\"\n",
|
||
" }]))\n",
|
||
"print(de)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"## Request"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"metadata": {},
|
||
"outputs": [],
|
||
"source": [
|
||
"import requests"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"metadata": {},
|
||
"outputs": [],
|
||
"source": [
|
||
"r = requests.post('', json=[\n",
|
||
"\t{\n",
|
||
"\t\t\"subject\":\"\",\n",
|
||
"\t\t\"body\":\"my emails don't arrive. I Work for Microsoft office\"\n",
|
||
"\t}\n",
|
||
"])"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"metadata": {},
|
||
"outputs": [],
|
||
"source": [
|
||
"r.json()"
|
||
]
|
||
}
|
||
],
|
||
"metadata": {
|
||
"kernelspec": {
|
||
"display_name": "nlp",
|
||
"language": "python",
|
||
"name": "nlp"
|
||
},
|
||
"language_info": {
|
||
"codemirror_mode": {
|
||
"name": "ipython",
|
||
"version": 3
|
||
},
|
||
"file_extension": ".py",
|
||
"mimetype": "text/x-python",
|
||
"name": "python",
|
||
"nbconvert_exporter": "python",
|
||
"pygments_lexer": "ipython3",
|
||
"version": "3.6.9"
|
||
}
|
||
},
|
||
"nbformat": 4,
|
||
"nbformat_minor": 4
|
||
}
|