DrunkenBerger commited on
Commit
a40906f
·
1 Parent(s): 6c2f418

Upload folder using huggingface_hub

Browse files
.wwebjs_cache/2.2330.11.html ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ <!DOCTYPE html><html class="no-js" dir="ltr" loc="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>WhatsApp Web</title><meta name="viewport" content="width=device-width"><meta name="google" content="notranslate"><meta name="format-detection" content="telephone=no"><meta name="description" content="Quickly send and receive WhatsApp messages right from your computer."><meta name="og:description" content="Quickly send and receive WhatsApp messages right from your computer."><meta name="og:url" content="https://web.whatsapp.com/"><meta name="og:title" content="WhatsApp Web"><meta name="og:image" content="https://static.facebook.com/images/whatsapp/www/whatsapp-promo.png"><link id="favicon" rel="shortcut icon" href="/img/favicon/1x/favicon.png" type="image/png"><link rel="apple-touch-icon" sizes="194x194" href="/apple-touch-icon.png" type="image/png"><meta name="theme-color" content="#111b21" media="(prefers-color-scheme: dark)"><meta name="theme-color" content="#f0f2f5"><link id="whatsapp-pwa-manifest-link" rel="manifest" href="/manifest.json" crossorigin="use-credentials"><style>#initial_startup{--startup-background:#f0f2f5;--startup-background-rgb:240,242,245;--startup-icon:#bbc5cb;--secondary-lighter:#8696a0;--primary-title:#41525d;--progress-primary:#00c298;--progress-background:#e9edef}.dark #initial_startup{--startup-background:#111b21;--startup-background-rgb:17,27,33;--startup-icon:#676f73;--primary-title:rgba(233, 237, 239, 0.88);--secondary-lighter:#667781;--progress-primary:#0b846d;--progress-background:#233138}#app,body,html{width:100%;height:100%;padding:0;margin:0;overflow:hidden}#app{position:absolute;top:0;left:0}#initial_startup{position:fixed;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;user-select:none;background-color:var(--startup-background)}#initial_startup .graphic{margin-top:-40px;color:var(--startup-icon)}#initial_startup .graphic .resume-logo{transform:translateX(calc(50% - 52px / 2))}#initial_startup .graphic::after{position:relative;top:-100%;left:calc(50% - 72px * 2 - 72px / 2);display:block;width:calc(72px * 3);height:100%;content:'';background:linear-gradient(to right,rgba(var(--startup-background-rgb),.5) 0,rgba(var(--startup-background-rgb),.5) 33.33%,rgba(var(--startup-background-rgb),0) 44.1%,rgba(var(--startup-background-rgb),0) 55.8%,rgba(var(--startup-background-rgb),.5) 66.66%,rgba(var(--startup-background-rgb),.5) 100%);opacity:1;animation:shimmer 1.5s linear .6s infinite}html[dir=rtl] #initial_startup .graphic::after{animation-direction:reverse}@keyframes shimmer{from{left:calc(50% - 72px * 2 - 72px / 2)}to{left:calc(50% - 72px / 2)}}#initial_startup .progress{position:relative;width:420px;height:3px;margin-top:40px}#initial_startup .progress progress{vertical-align:top}#initial_startup .main{margin-top:40px;font-size:17px;color:var(--primary-title)}#initial_startup .secondary{margin-top:12px;font-size:14px;color:var(--secondary-lighter)}#initial_startup .secondary span{display:inline-block;margin-bottom:2px;vertical-align:middle}progress{-webkit-appearance:none;appearance:none;width:100%;height:3px;margin:0;color:var(--progress-primary);background-color:var(--progress-background);border:none}progress[value]::-webkit-progress-bar{background-color:var(--progress-background)}progress[value]::-moz-progress-bar,progress[value]::-webkit-progress-value{background-color:var(--progress-primary);transition:width .45s ease}</style><link href="/stylex-a8126d9a2c64f3701750323fdab99239.css" rel="stylesheet"><link href="/app-86c34e1f88760a6b9f60.css" rel="stylesheet"></head><body class="web"><script data-binary-transparency-hash-key="inline-js-d11c72a06542fc3b43af600028cf0f996e4b9b178dfa047e18730efaf74aab0b">try{var systemThemeDark,theme=window.localStorage.getItem("theme"),systemThemeMode=window.localStorage.getItem("system-theme-mode");if(("true"===systemThemeMode||!theme)&&window.matchMedia){var systemTheme=window.matchMedia("(prefers-color-scheme: dark)");systemThemeDark=systemTheme&&systemTheme.matches}var darkTheme='"dark"'===theme||Boolean(systemThemeDark);darkTheme&&document.body.classList.add("dark")}catch(e){}</script><div id="app"></div><div id="hard_expire_time" data-time="1704932380.852"></div><div id="initial_startup"><div class="graphic"><span><svg width="250" height="52" xmlns="http://www.w3.org/2000/svg"><path class="resume-logo" d="M37.7 31.2c-.6-.4-3.8-2-4.4-2.1-.6-.2-1-.4-1.4.3l-2 2.5c-.4.4-.8.5-1.5.2-.6-.3-2.7-1-5.1-3.2-2-1.7-3.2-3.8-3.6-4.5-.4-.6 0-1 .3-1.3l1-1.1.6-1.1c.2-.4 0-.8 0-1.1l-2-4.8c-.6-1.3-1.1-1-1.5-1.1h-1.2c-.5 0-1.2.1-1.8.8-.5.6-2.2 2.2-2.2 5.3 0 3.2 2.3 6.3 2.6 6.7.3.4 4.6 7 11 9.7l3.7 1.4c1.5.5 3 .4 4 .2 1.3-.1 3.9-1.5 4.4-3 .5-1.5.5-2.8.4-3-.2-.4-.6-.5-1.3-.8M26 47.2c-3.9 0-7.6-1-11-3l-.7-.4-8.1 2L8.4 38l-.6-.8A21.4 21.4 0 0126 4.4a21.3 21.3 0 0121.4 21.4c0 11.8-9.6 21.4-21.4 21.4M44.2 7.6a25.8 25.8 0 00-40.6 31L0 52l13.7-3.6A25.8 25.8 0 0044.3 7.5" fill="currentColor"></path></svg></span></div><div class="progress"><progress value="0" max="100" dir="ltr"></progress></div><div class="main">WhatsApp</div><div class="secondary"><span><svg width="10" height="12" xmlns="http://www.w3.org/2000/svg"><path d="M5 1.6c1.4 0 2.5 1 2.6 2.4v1.5h.2c.5 0 1 .4 1 1V10c0 .6-.5 1-1 1H2.3a1 1 0 01-1.1-1V6.5c0-.6.5-1 1-1h.2V4.2c0-1.4 1-2.5 2.4-2.6H5zm0 1.2c-.7 0-1.3.6-1.3 1.3v1.4h2.6V4.2c0-.7-.4-1.2-1-1.3H5z" fill="currentColor"></path></svg> </span>&nbsp;End-to-end encrypted</div></div><link rel="preload" crossorigin="anonymous" as="fetch" href="/binary-transparency-manifest-2.2330.11.json" id="binary-transparency-manifest-preload"><script src="/libsignal-protocol-ee5b8ba.min.js"></script><script defer="defer" src="/runtime.869c26dfd15bfec84bbb.js"></script><script data-binary-transparency-hash-key="inline-js-8a8b71afa5e8cc2edac500de9d937b78d249c921983985052d9e9475334879fb">/*! Copyright (c) 2023 WhatsApp Inc. All Rights Reserved. */
2
+ (self.webpackChunkwhatsapp_web_client=self.webpackChunkwhatsapp_web_client||[]).push([[5617],{307914:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},595318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},415227:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=new Error(e);if(void 0===t.stack)try{throw t}catch(e){}return t}},670983:(e,t,r)=>{"use strict";var n=r(307914);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"?";if(null==e)throw(0,o.default)("Unexpected null or undefined: "+t);return e};var o=n(r(415227))},801506:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TICKET_URL=t.CLB_URL=t.CLB_TOKEN=t.CLB_CHECK_URL=void 0,t.CLB_CHECK_URL="https://crashlogs.whatsapp.net/wa_fls_upload_check",t.CLB_TOKEN="1063127757113399|745146ffa34413f9dbb5469f5370b7af",t.CLB_URL="https://crashlogs.whatsapp.net/wa_clb_data",t.TICKET_URL="https://web.whatsapp.com/web-contact-us"},207024:(e,t,r)=>{"use strict";var n=r(595318);Object.defineProperty(t,"__esModule",{value:!0}),t.getDistribution=function(){let e="unknown";return e="prod","web_prod"},t.getLogUserAgent=function(e){let t,{appVersion:r,browser:n,device:o}=e;return t="Web/"+n,`WhatsApp/${r} ${t} Device/${o}`},n(r(97359)),n(r(556869))},794858:(e,t,r)=>{"use strict";var n=r(595318),o=n(r(670983)),a=r(801506),s=r(207024),u=n(r(174285)),c=r(425017);function i(e){!function(e,t){const r=window.navigator.userAgent;if(r===f&&e.includes("getElementsByTagName"))return;const n=new FormData,i=new Blob([e],{type:"text/plain"});n.append("from_jid",function(){if(p)return p;try{p=JSON.parse((0,o.default)(u.default,"localStorage").getItem(d)),p&&(p=p.replace("-",""))}catch(e){}if(!p){p="unknown"+Math.floor(1e10*Math.random());const e=p;try{(0,o.default)(u.default,"localStorage").setItem(d,JSON.stringify(e))}catch(e){}}return(0,o.default)(p,"id")}()),n.append("agent",(0,s.getLogUserAgent)((0,c.parseUASimple)(r,"2.2330.11"))),n.append("file",i,"logs.txt"),n.append("tags","load");const l=new XMLHttpRequest,_=a.CLB_URL+"?access_token="+encodeURIComponent(a.CLB_TOKEN);l.open("POST",_,!0),l.send(n)}(e)}function l(e){let{error:t,reason:r,stack:n}=e;const o=(new Date).toISOString();return`${o}: error: ${t}\n${o}: reason for logs: ${r}\n${o}: userAgent: ${window.navigator.userAgent}\n${n}`}null==window.onerror&&(window.onerror=function(e,t,r){const n=t.split("?")[0];return"Uncaught SyntaxError: Unexpected token '<'"===e?(function(e){i(l({error:"failed to load a js or css bundle",reason:`failed to load [${e.split("/")[3].replace(/^\//,"")}]`,stack:""}))}(n),!0):(i(l({error:e,reason:`Error at [${n}:${r}]`,stack:""})),!1)});const d="WAUnknownID",f="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36";let p},425017:(e,t)=>{"use strict";function r(e){return e.includes("windows")?"Windows":e.includes("mac")?"Mac OS":e.includes("linux")?"Linux":"Unparsed"}Object.defineProperty(t,"__esModule",{value:!0}),t.parseUASimple=function(e,t){const n=e.toLowerCase();return{browser:s(n),device:r(n),appVersion:t}};const n=/(chrome|firefox)\/([\w\.]+)/i,o=/(edge|opr)\/([\w\.]+)/i,a={chrome:"Chrome",edge:"Edge",opr:"Opera",firefox:"Firefox"};function s(e){const t=e.match(o)||e.match(n);return null==t?"Unparsed":`${a[t[1]]} ${t[2]}`}},174285:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;try{r=window.localStorage}catch(e){}var n=r;t.default=n},97359:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.default}},556869:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){const r=new Error(t);if(void 0===r.stack)try{throw e}catch(e){}return r}}},e=>{"use strict";e(e.s=794858)}])</script><script defer="defer" src="/vendor1~app.be50aaad33253076fc3f.js"></script><script defer="defer" src="/app.5625fae9b98ebab166c8.js"></script><script data-binary-transparency-hash-key="inline-js-9c8cd3d0f4d5af8c7f5cd1c45208edd308bfe472e353a50e4cbacbf6cb58627c">(i => {const l = document.getElementById(i); l &&fetch(l.href).then(b => b.text()).then(code => {const script = document.createElement('script');script.id = 'binary-transparency-manifest';script.type = 'application/json';script.innerHTML = code;document.body.append(script);});})('binary-transparency-manifest-preload');</script></body></html>
README.md CHANGED
@@ -1,12 +1,6 @@
1
  ---
2
- title: Gbmdocubot
3
- emoji: 🌖
4
- colorFrom: red
5
- colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 3.39.0
8
- app_file: app.py
9
- pinned: false
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: gbmdocubot
3
+ app_file: docubot.py
 
 
4
  sdk: gradio
5
+ sdk_version: 3.38.0
 
 
6
  ---
 
 
data.txt ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are UnderwriteAI. An AI that is an expert document analyser.
2
+
3
+ I will give you a set of 5 Documents and ask you questions about them like.
4
+
5
+ "What is Document one?"
6
+
7
+ or
8
+
9
+ "Who is the person in document 3?"
10
+
11
+ or
12
+
13
+ "What is the expiration date of document 5?"
14
+
15
+ and so on.
16
+
17
+ Your job is to extract the information to the best of your habilities.
18
+
19
+ Please check the following documents:
docsprueba/doc1.txt ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Document 1:
2
+
3
+ SECRETARÍA DEC MOP/IIDAS
4
+ SUBSECRETARÍA DEL TRANS) T7E
5
+
6
+ a LICENCIA DE CONDUCIR
7
+
8
+ Eeta irencia se expidió conforme a la normatividad aplicable en materia de rayrdari) y rimar, vr a
9
+ Casgea de México Por ello quien la posee está comprometido a cumple con estes mwya: pora proteger e,
10
+ vida la de otros tripulantes y la de otros usuarios de la na
11
+
12
+ TIPO
13
+ (C15291 827
14
+
15
+ Licencia No
16
+
17
+ ] a, ESTADOS UNIDOS MEXICANOS
18
+ Y O Y GOBIERNO DE LA CIUDAD DE MÉXICO
19
+ > Ó
20
+
21
+
22
+
23
+ ALEJANDRO ALBAS BRAV(:
24
+
25
+ Antiguedad nt ERPETTO Vigernsa
26
+ 31/03/2012” 21/01/2022 “21/01/2025
27
+
28
+ A
29
+ o
30
+
31
+
32
+
33
+
34
+ 7 Nacionalidad lipo de Sanyie
35
+ MEXICANA A-
36
+
37
+ | Hb
38
+ r |
39
+ / AABA8S07U9
40
+ Autorizó
41
+ GOBIERNO DE LA
42
+ CIUDAD DEMExIco
43
+ MTRA.GUADALUPE ALEJANDRA TAPIA ALVAREZ
44
+ |Operador
45
+ MITZI ITZAYANA FIGUEROA JUAREZ
46
+ Folio de pago
47
+ |01AAABA850709QXC408D
48
+ Módulo
49
+ 54
50
+ oSEMOv
51
+ SMOvISEMOVISEMOVsEOvSEMOViSE MOe
52
+ sEMMO VIS
53
+ SEMOMSEMOV
54
+ 1984977
55
+ Documento público protegido conforme a
56
+ la Ley de Protección de DatosPersonales
57
+ Mye. Adrés Lajous Loasza
58
+ SecretaiodeMovilidad
docsprueba/doc2.txt ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Document 2:
2
+
3
+ 7 ) m A rd
4
+ A tl aa a o ad — — pS A
5
+
6
+ AAA nr
7
+
8
+ dolida A eos dao y CU
9
+ SECRETARÍA DE MOVILIDAD
10
+
11
+ LICENCIA DE CONDUCIR
12
+
13
+ CIUDAD DE MÉXICO
14
+
15
+ BA
16
+
17
+ l
18
+
19
+ Licencia No
20
+ R 12908428
21
+
22
+ FERNANDO JOSE
23
+ DE ABIEGA FORCEN
24
+
25
+ Antiqueodad o Expedlicion
26
+ 28/12/2001 19/12/2017
27
+
28
+ Ph ro ld a] KI
29
+ MEXICANA AIFF671222
30
+
31
+ YN CN
32
+
33
+ PERMANE NIF
34
+ ¿A .
35
+ ja —
36
+
37
+ nto. A Meneses Bliss
38
+ r.-d 0...» bo. Mim. a.)
39
+ CDMA
40
+
41
+ CIUDAD DE MÉXICO
42
+
43
+
44
+
45
+ Módulo A17945812u4
46
+
47
+ 28
48
+
49
+ 1% !
50
+
51
+
52
+
53
+ ANNO
54
+
55
+ V 4 e N a
56
+
57
+ pa AIN
58
+ o Firma 2.0 Huella Digital
59
+
60
+ Esta licencia de conducir se expide con base en
61
+ en ol Reglamento de la Ley de Movilidad
62
+ -de la Ciudad de México.
63
+
64
+
65
+
66
+
67
+
68
+ Autorizó
69
+
70
+ RAYMUNDO MEZA LÓPEZ.
71
+
72
+ p > Operador o
73
+
74
+ RIGOBERTO MONDRAGON MONROY
docsprueba/doc3.txt ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Document 3
2
+
3
+ 10
4
+ 2
5
+ CO
6
+ FECHADE
7
+ IERTO
8
+ LBE
9
+ IC/2022FECHADE
10
+ EXPEDICIÓN:
11
+ 04/FEB/1972FECHAOE
12
+ NACIMIENTO:
13
+ EDGAR
14
+ 13
15
+ NOMBRES
16
+ GONZALEZ
17
+ APELLIDO
18
+ 5
19
+ 5
20
+ MARTIN
21
+ 480000224073
22
+ 12
23
+ NUMERO
24
+ DE
25
+ LICENCIA
26
+ APELLIDo
27
+ PATERNO
28
+ MAGE720204HGTRNDO7
29
+ 11
30
+ CURP
31
+ TIPODE
32
+ LICENCA
33
+ A
34
+ ESTADODE
35
+ MÉXICO
36
+ GOBIERNODEL
37
+ LICENCIA
38
+ PARA
39
+ CONDUCIR
40
+ ESTADOS
41
+ UNIDOS
42
+ MEXICANOS
43
+ MATERNO
44
+ B
45
+ 17 TI
46
+ P
47
+ O
48
+ DE GRE:
49
+ 16 SEXO:
50
+ 21
51
+ AUTOMÓVILES PARTICÚLARES
52
+ SECRETARIO
53
+ DE MOVILIDAD
54
+ I
55
+ C
56
+ . LUIS GILBERTOLIMON CH¤VEZ
57
+ 20 ESTA LICENCUA AUTORIZA
58
+ A CONDUCIR:
59
+ 13/09/2008
60
+ 15 FECHA
61
+ DE ANTIaÜEDAD:
62
+ PLAZA SENDERO
63
+ 14 OFICINA EMISORA:
64
+ NINGUNA
65
+ 10 RESTAICCIONES:
66
+ 18 DONADOR
67
+ DE ORQANOS:
68
+ SIL
69
+ TADO
70
+ DE MEce corNCerL EsTANO
71
+ Dr MEI
72
+ C
73
+ O CORNO
74
+ DEL ESTADO
75
+ DE MEI
76
+ C
77
+ O GOBIANO
78
+ DEL TADO
79
+ DI Mvi
80
+ c
81
+ o Gosi
82
+ t
83
+ n
84
+ NO
85
+ bt i
86
+ T
87
+ AD0
88
+ Dr Mt
89
+ r
90
+ cO GoNraMo
91
+ DEL r37Ano
92
+ nt wt
93
+ v
94
+ i
95
+ c
96
+ o co*O tR\tstann nrco
97
+ DECISIONES
98
+ FIRMES, RESULTADOSFUERTES.
99
+ EDOAAÉX
docsprueba/doc4.txt ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Document 4:
2
+
3
+ ESTADOS UNIDOS MEXICANOS
4
+
5
+ GOBIERNO DEL ESTADO
6
+ DE GUANAJUATO
7
+
8
+
9
+
10
+ LICENCIA DE CONDUCIR
11
+ NO A
12
+ LR2606332753 EXPEDICIÓN / ISSUE
13
+ NOMBRE — NARe: 16/08/2019
14
+ LAURA ESTHER MONTOYA QUEZADA EXPIRA / EXPRES
15
+ CURE REC 16/08/2024
16
+ MOQL790311IMSPNZRO7 ¡ PRIMER REGISTRO
17
+ DOMICILIO. ADDRESS 06/04/2019
18
+ ne 110C 225, CP. 37100, LA MARINA,
19
+ LEON
20
+
21
+ LICENCIA TIPONLICENSE
22
+ 9
23
+
24
+
25
+
26
+ LF
27
+
28
+ DIRECTOR GENERAL DE TRANSPORTE DEL
29
+ ESTADO DE GUANAJUATO
30
+
31
+ FRIMA
32
+ TA
33
+ ESTADOS UNIDOS MEXICANOS
34
+
35
+ GOBIERNO DEL ESTADO DE GUANAJUATO
36
+
37
+
38
+
39
+ FIPO DE SANGRE / BLOOD TYPE NINGUNA / NONE
40
+ A+ 0 Seira
41
+ DONADOR / DONOR q EOJOS / CORRECTIVE LENSES
42
+ N puta
43
+ O ICCIONES /[ RESTRICTIONS PRÓTESIS / PROSTHESIS o
44
+ 2
45
+ 1444 HIPERTENSIÓN / HYPERTENSION
46
+ 3
47
+
48
+ TES J DIABETES
49
+
50
+ http:/Htransporte guanajuato.gob.ma
51
+
52
+ 002819617
docsprueba/doc5.txt ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Document 5:
2
+
3
+ ESTADOS UNIDOS MEXICANOS
4
+ GOBIERNO DEL DISTRITO FEDERAL
5
+ SECRETARIA DE TRANSPORTES Y VIALIDAD
6
+
7
+ LICENCIA PARA CONDUCIR
8
+
9
+
10
+
11
+ - Vigencia
12
+ . PERMANENTE
13
+
14
+ _ Expedición
15
+ E 0510712005
16
+
17
+ rc y
18
+
19
+ Antigiledad
20
+ 04 10/1996
21
+
22
+ E Nacional
23
+ - MEXICANA
24
+
25
+
26
+
27
+ ADOLFO ANDRES
28
+ BAEZA ARRATE
29
+
30
+ INN
31
+
32
+
33
+
34
+ bic No SO81R1Nma
35
+ "> 47-5PI8BA61
36
+
37
+
38
+
39
+
40
+
41
+ a :
42
+ -
43
+ .
44
+ - 9?
45
+ r >
46
+ -
47
+ 2
48
+ . o.
49
+ "oe
50
+ . 2
51
+ o
52
+ > .
53
+ -
54
+ o w
55
+ . s”
56
+ y eS Lor”
57
+ . . .Y
58
+ . e
59
+ - r
60
+ rd ”
61
+ te, r*
62
+ 4
63
+ .
64
+ .
65
+ r .
66
+ e
67
+ ” a
68
+ .? e '
69
+ . “e .
70
+ -
71
+ . a 4 e. . ..
72
+ : o we. coculdao : .
73
+ me, ¿ao”r” a " e e ae” :
74
+ . o a OP ES TN »” >
75
+ . / Pr e TA o > part? Gure pr LI
76
+ . o na. « o ,
77
+ no oo mar ta, e Le? cn. -
78
+ e .
79
+ w carr t UNE per AS te
80
+
81
+ Die. Gral. de al
82
+
83
+ ¿dd TE .. oo ral. de Reg
84
+ Esta licencia de conducir se expide con base en lo
85
+ dispuesto en el Reglamento de Tránsito del Distrito
86
+ Pederal vigente. Pr
87
+
88
+
89
+
90
+
91
+
92
+ BAAB670430 o
93
+ Beatriz Barrera Aguilar
94
+
95
+ JIIOPAIAXI
docubot.py ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import openai
3
+ import time
4
+
5
+ openai.api_key = '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'
6
+
7
+ # Start with a system message
8
+ with open('data.txt', 'r') as file:
9
+ data = file.read().replace('\n', '')
10
+
11
+ # Open documents
12
+ with open('./docsprueba/doc1.txt', 'r') as file:
13
+ doc1 = file.read().replace('\n', '')
14
+
15
+ with open('./docsprueba/doc2.txt', 'r') as file:
16
+ doc2 = file.read().replace('\n', '')
17
+
18
+ with open('./docsprueba/doc3.txt', 'r') as file:
19
+ doc3 = file.read().replace('\n', '')
20
+
21
+ with open('./docsprueba/doc4.txt', 'r') as file:
22
+ doc4 = file.read().replace('\n', '')
23
+
24
+ with open('./docsprueba/doc5.txt', 'r') as file:
25
+ doc5 = file.read().replace('\n', '')
26
+
27
+ history = [{"role": "system", "content": data + doc1 + doc2 + doc3 + doc4 + doc5}]
28
+
29
+ with gr.Blocks() as demo:
30
+ chatbot = gr.Chatbot()
31
+ msg = gr.Textbox()
32
+ clear = gr.ClearButton([msg, chatbot])
33
+
34
+ def respond(message, chat_history):
35
+ global history
36
+ # Add the user's message to the conversation
37
+ history.append({"role": "user", "content": message})
38
+
39
+ # Get a response from the model
40
+ response = openai.ChatCompletion.create(
41
+ model="gpt-3.5-turbo",
42
+ messages=history,
43
+ temperature=0.8,
44
+ max_tokens=225,
45
+ top_p=0.80,
46
+ frequency_penalty=0.6,
47
+ presence_penalty=0.5,
48
+ stop=["thank you", "good bye", "shut up", "thanks"]
49
+ )
50
+
51
+ # Extract the assistant's message from the response
52
+ bot_message = response['choices'][0]['message']['content']
53
+
54
+ # Add the assistant's message to the conversation
55
+ history.append({"role": "assistant", "content": bot_message})
56
+
57
+ chat_history.append((message, bot_message))
58
+ time.sleep(2)
59
+ return "", chat_history
60
+
61
+ msg.submit(respond, [msg, chatbot], [msg, chatbot])
62
+
63
+ demo.launch(share=True)
documentos.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46d6b76a086ed272e08f5052b9376cb52a72d1d5f15dab7a45aaaaca238ebb4b
3
+ size 6587
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ openai