Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker API not handling batch requests #188

Open
vintrocode opened this issue May 24, 2021 · 2 comments
Open

Docker API not handling batch requests #188

vintrocode opened this issue May 24, 2021 · 2 comments

Comments

@vintrocode
Copy link

Hello,

I'm sending a list of sentences to the Flask API being served in the Docker container.
It looks as though it get an embedding for the first sentence and nothing more.

questions = self.target['source']  # self.target is a pd.DataFrame
q_params = {"q": questions, "lang": self.lang}
q_resp = requests.get(url=url, params=q_params).json()

HTTP request looks good, with all my queries showing up...

laser_1        | 172.21.0.3 - - [24/May/2021 18:51:36] "GET /vectorize?q=are+rollups+safe%3F&q=are+rollups+secure%3F&q=can+rollups+get+hacked%3F&q=why+is+there+a+delay+for+withdrawals%3F&q=why+do+I+have+to+wait+to+take+money+off+optimism%3F&q=how+come+there%27s+a+week+delay+to+get+my+tokens%3F&q=I+initiated+a+withdrawal+but+haven%27t+seen+my+funds+on+layer+1&q=why+didn%27t+my+funds+show+up+on+layer+1%3F&q=does+eth+get+used+natively%3F&q=can+you+use+eth+on+optimism+layer+2%3F&q=does+optimism+use+eth+natively%3F&q=how+are+ethereum+and+optimism+different%3F&q=what%27s+the+difference+between+optimism+and+ethereum%3F&q=are+optimism+and+ethereum+the+same+thing%3F&q=how+is+optimism+different+than+ethereum%3F&q=how+do+gas+fees+work%3F&q=how+much+is+gas+on+optimism%3F&q=is+gas+free+on+optimism%3F&q=can+I+perform+gasless+transactions+on+optimism%3F&q=is+optimism+a+side+chain%3F&q=is+optimism+like+polygon%3F&q=is+optimism+like+matic%3F&q=are+rollups+like+side+chains%3F&q=what+is+optimism%3F&q=can+someone+explain+what+optimism+is%3F&q=I+don%27t+get+what+optimism+is&q=how+does+optimism+work%3F&q=does+optimism+have+a+token%3F&q=wen+token%3F&q=will+there+be+a+token+sale%3F&q=will+there+ever+be+a+token%3F&lang=en HTTP/1.1" 200 -

However, when i inspect my objects I'm only seeing one embedding for the first sentence in my dataset

>>> q_resp
{'content': 'are rollups safe?', 'embedding': [[0.006896499078720808, 0.0008682733750902116, 2.3302329282159917e-05, 0.019545545801520348, 0.02323770895600319, 0.0027267790865153074, 0.006234459113329649, 0.0010635550133883953, 0.008298469707369804, -0.00198509288020432, 0.02701161988079548, 0.0018054023385047913, 0.0015152408741414547, 0.0052356724627316, 0.01686531864106655, 0.005486164707690477, 0.003971261437982321, 0.0024603204801678658, -0.00046757759992033243, 0.0005743122892454267, 0.002572837984189391, 0.014154700562357903, -0.0017922535771504045, 0.0019696862436830997, 0.002940467558801174, 0.0004275832325220108, 0.012331436388194561, 0.005137732718139887, -0.0013881131308153272, 0.002699504606425762, 0.0068814377300441265, 0.015245484188199043, -0.0010529259452596307, -0.0021112042013555765, -0.0034494074061512947, 0.008906453847885132, 0.006248805671930313, 0.004935550503432751, 0.003102224785834551, 0.0001662701106397435, 0.0045767915435135365, 0.009745897725224495, 0.0010161070385947824, 0.007833623327314854, 0.009381244890391827, 0.002468213438987732, -0.00018282474775332958, -0.0007846990483812988, 0.01537888590246439, -0.0003008776402566582, -0.002298138104379177, -0.0011936761438846588, 0.0069606713950634, 0.012230637483298779, 0.001462216372601688, -4.0053488191915676e-05, 0.002099740318953991, 0.0005182296154089272, 0.0709032416343689, -0.0005012449692003429, 0.01333634089678526, 0.004549379926174879, 0.02264135144650936, 0.024654410779476166, 0.01633474975824356, 0.001595790614373982, 0.008009758777916431, -0.00017391167057212442, 0.0010691015049815178, 0.021696558222174644, 0.012276575900614262, -0.0005036420770920813, -0.0003523101331666112, 0.01035558246076107, -0.00020173478696960956, -0.0031579965725541115, 0.003943691495805979, 0.0009781649569049478, 0.02366168610751629, -0.0026703395415097475, 0.006965890992432833, -0.00040659611113369465, 0.0027730560395866632, 0.0060025607235729694, 0.0003550198453012854, 0.00041085659177042544, 0.020592590793967247, 0.02718479558825493, 0.00600449601188302, 0.0006135657895356417, -0.0036272939760237932, 0.006715372670441866, 0.001857970841228962, 0.0022350577637553215, 0.005401427857577801, -0.0002395806077402085, 0.0021415133960545063, -0.0003989303659182042, 0.005796875339001417, 0.028357649222016335, 2.778748466880643e-06, -0.000602695916313678, 0.004718378651887178, -0.0019347600173205137, 0.00012816236994694918, 0.00525967450812459, 0.002187123754993081, 0.009664008393883705, 0.006533667910844088, 0.0006889933138154447, 0.00010465962259331718, 0.0005464734858833253, -0.00021114521950948983, 0.004986398387700319, -0.0025114226154983044, 0.015428576618432999, 0.000372668553609401, -0.00036448403261601925, 0.0017614001408219337, -0.0024477301631122828, 0.013458242639899254, 3.329194078105502e-05, 0.013770041987299919, 0.0068224333226680756, 0.00033734203316271305, 0.0224471278488636, 0.0011573522351682186, 0.0011479335371404886, 0.00931639689952135, 0.0007749672513455153, 0.007922924123704433, 0.007375125307589769, 0.000505833828356117, 0.005261438898742199, 0.00267274072393775, -0.0001634857471799478, -0.0018685380928218365, 0.021696405485272408, 0.0001699664571788162, 0.005805704742670059, -0.0003039004805032164, -0.0015356552321463823, -0.00024042732547968626, -0.0008035816717892885, 0.01575886271893978, 0.0010026834206655622, 0.03145740181207657, 0.00016513730224687606, 0.00048509976477362216, 0.010167283937335014, 0.00047550909221172333, -0.000544246518984437, 0.004433040041476488, -0.0003269468725193292, 0.0001274746609851718, 0.016273723915219307, 0.007923231460154057, -0.00022994173923507333, 0.013071299530565739, 0.000528721313457936, -4.8746060201665387e-05, 0.005811801180243492, 0.006228259764611721, -0.0004140565579291433, 0.019868511706590652, 0.02673454023897648, -0.002965250751003623, 0.009050427936017513, -0.00013004803622607142, 0.05229221284389496, 0.005965217482298613, 0.013527898117899895, -0.0009493866818957031, 0.014584047719836235, -0.0015901754377409816, 0.003711170982569456, 0.005032014567404985, 0.003187656169757247, -0.0004795498098246753, -0.00041605118894949555, 0.0005782178486697376, 0.006940399296581745, -5.8615594753064215e-05, 0.0027109687216579914, 0.00021644898515660316, -0.002877742750570178, 0.011997519060969353, 0.0029690430965274572, 0.003874259302392602, 0.0003312623011879623, 0.004684653598815203, 0.0027980722952634096, 0.00853221956640482, 0.007955724373459816, 0.026769395917654037, 0.011021018028259277, -7.815462595317513e-05, 0.0076302108354866505, 0.026261091232299805, 0.09647306799888611, 0.00022989900026004761, 0.008001411333680153, -0.0005883746198378503, 0.004840081091970205, 0.013803995214402676, -0.007521025370806456, 0.006736120209097862, 0.0012615035520866513, 0.0004974557086825371, 0.024343237280845642, 0.00344653706997633, -0.00010143453255295753, 0.001697676838375628, 0.0011878892546519637, 0.05904420465230942, 0.0010130610316991806, 0.00011236324644414708, 0.0019527655094861984, 0.006327942479401827, 0.001803484745323658, -0.0008519919356331229, 0.03134677931666374, -0.005887006875127554, -0.0010543580865487456, -0.002895119832828641, 0.008341227658092976, 0.00043883442413061857, 0.002904361579567194, -5.846462045155931e-06, -0.003992815036326647, 0.026303943246603012, 0.02427595481276512, 0.02936728298664093, -4.1897543269442394e-05, 0.0016962195513769984, 0.0010701912688091397, 0.0059158834628760815, 0.014352590776979923, 0.010516100563108921, -0.00011529890616657212, 0.00023947807494550943, 0.008182927966117859, -0.0032098100055009127, 0.000580277934204787, 0.00023181777214631438, -0.004634812008589506, -0.003471591742709279, 0.005201954394578934, -0.00135601288639009, 0.002077460056170821, 0.021228091791272163, 0.003967547323554754, 0.004020605701953173, 0.014079865999519825, 0.0017406176775693893, 0.008121766149997711, 0.0019729123450815678, 0.022376716136932373, 0.00018696287588682026, 0.04750632494688034, 0.01012683566659689, -5.5786571465432644e-05, 0.008026471361517906, 0.0037056829314678907, 0.00021990921231918037, 0.008523666299879551, 0.002970634028315544, 0.0010936240432783961, -0.002532578306272626, 0.003913923166692257, 0.00038316831341944635, 0.0012115397257730365, -0.0007119106594473124, 0.004251587204635143, 0.0008623619214631617, 0.0014613786479458213, -6.438946002162993e-05, 0.0004959068028256297, 0.002198783913627267, -0.00010740882862592116, 0.014743447303771973, 0.0023184404708445072, 0.0028364690952003, 0.02317395620048046, 0.00428958423435688, 0.000624174193944782, 0.015310728922486305, -0.0009643100784160197, 0.000990477274172008, 0.019913045689463615, 0.0022885471116751432, -2.4361372197745368e-05, 0.02768058516085148, 0.0021461318247020245, -0.00019625076674856246, 0.024147871881723404, 2.6727513613877818e-05, 0.0005757460021413863, 0.0103774294257164, 0.0051710898987948895, 0.0638241097331047, -0.0003488377551548183, 0.00020403497910592705, 0.02376851812005043, 0.000750071310903877, 0.003156305057927966, 0.01256406120955944, 0.006635731086134911, 0.04506533965468407, 0.024697590619325638, 0.0008488799212500453, 0.0077636041678488255, -0.0001744438923196867, 0.008055528625845909, -0.000571881071664393, -0.001309320330619812, 0.003459812607616186, -5.597744166152552e-05, -0.0005219368613325059, 0.009524421766400337, -4.460318086785264e-05, 0.011645661666989326, -0.0005700814072042704, 0.0015241234796121716, 0.012353894300758839, -0.0008936980739235878, -0.0002573489036876708, 0.0025346772745251656, 0.044143859297037125, -0.002085596090182662, -0.002365878550335765, -0.00024056680558715016, 0.00046940709580667317, 0.0003277048235759139, -0.0008770495769567788, 0.005182182416319847, 0.0028137501794844866, 0.0065100789070129395, 0.0085218520835042, 0.002280374290421605, 0.0019035640871152282, 0.0022316568065434694, -0.0012290809536352754, 0.0023039195220917463, 0.013737012632191181, 0.010889935307204723, 0.018862247467041016, 0.025776805356144905, 0.0019025381188839674, -0.0006769648753106594, -0.0007241430575959384, 0.013315575197339058, 0.000166692552738823, 0.0015627768589183688, -0.00029252245440147817, 0.014201443642377853, 0.004582383204251528, 0.0033797151409089565, 0.01584562659263611, 0.001236599637195468, 0.006024396512657404, 0.003525911597535014, -0.0004149309534113854, -6.250756268855184e-05, -0.004839105065912008, 0.019107181578874588, 0.0009086191421374679, -0.00015301519306376576, -0.004312178585678339, 0.002213908825069666, -0.0016434695571660995, -2.673825656529516e-05, 0.00016329297795891762, 0.009751906618475914, 0.005748584400862455, 0.003498774254694581, -0.004639446269720793, 0.0043052127584815025, 0.021678300574421883, 0.009897136129438877, 0.0009001935832202435, 0.006907896138727665, 0.00012097920989617705, 0.008513524197041988, 0.006769923958927393, 0.00028003344777971506, 0.0011510563781484962, 0.04605981335043907, 0.002398628043010831, 0.027390487492084503, 0.022462213411927223, 0.0045030140317976475, 0.0010649883188307285, -0.0003107626980636269, 0.042273297905921936, 0.0009679155773483217, 4.8172736569540575e-05, 0.005588221363723278, 0.0018254490569233894, 0.012754051014780998, 0.00030830319155938923, 0.010786554776132107, 0.012724519707262516, 0.003403994021937251, -0.0008081443374976516, 0.015765713527798653, 0.008028140291571617, -0.0005320023628883064, -0.0026337229646742344, 0.03476382791996002, 0.013347005471587181, 0.003550421679392457, 0.004478408023715019, 0.040150247514247894, 0.029279569163918495, -0.0007679212721996009, -0.0004931256989948452, -0.003170618787407875, -0.00046076433500275016, 0.0016539813950657845, -0.0008157178526744246, 0.004164158832281828, -5.795342440251261e-05, 0.0044429488480091095, 0.0005658794543705881, 0.00340029364451766, 0.005454691592603922, 0.0009269490838050842, 0.00020980228146072477, -3.0530169169651344e-05, 0.0015482715098187327, 0.0030240339692682028, 0.0037454036064445972, 0.01143310684710741, 0.003281831508502364, 0.014199109748005867, 0.0038331658579409122, -0.0014105564914643764, 0.009106013923883438, 0.00013317918637767434, 0.0008598253480158746, 0.02190287411212921, -0.00047311256639659405, 0.007851919159293175, 0.0021682907827198505, 0.0037435826379805803, 0.053887996822595596, 0.0017307684756815434, 0.003032178618013859, -0.0010176603682339191, 0.003806974506005645, 0.0016980383079499006, -0.0011831525480374694, -0.0007121695089153945, 0.002380616031587124, 0.0004153239424340427, 0.0009683340904302895, 0.008240735158324242, 0.0006671624723821878, 0.009125154465436935, 0.0050972215831279755, -0.0002632316027302295, 0.037979964166879654, 0.12484943866729736, 0.029856199398636818, 0.01517325546592474, 0.012479741126298904, 0.006669217720627785, 0.005464253481477499, 0.007090758066624403, 0.008193910121917725, 0.001971667632460594, -0.0026493575423955917, 0.008529390208423138, 0.000463127187686041, 0.007426104508340359, 0.0011880332604050636, 0.0005863671540282667, -0.00040160867501981556, -0.006524344906210899, 0.0024594725109636784, 0.027342388406395912, 0.0014624784234911203, 0.005678560584783554, 0.0011502823326736689, 0.0031912552658468485, -0.0010911398567259312, 0.023267608135938644, -0.0002547043841332197, 0.027352841570973396, -0.011583519168198109, 0.030627742409706116, 0.005211395211517811, 0.0003803559229709208, 0.006081078201532364, 0.005384288728237152, -0.000529986631590873, 0.008452019654214382, 0.029155313968658447, 0.003134932368993759, 0.01024597603827715, 3.725697024492547e-05, 0.00904729962348938, 0.00244969897903502, 0.01149317529052496, -0.002992847701534629, -0.002201111288741231, 0.017962796613574028, 3.372148785274476e-05, 0.004401874728500843, -0.0009280500235036016, 0.013890448026359081, 5.376879471441498e-06, 0.06219862774014473, 0.011691861785948277, 0.0036267414689064026, 0.012839009054005146, 0.004111327696591616, 0.004299110267311335, -0.00021925555483903736, -0.0006914550322107971, 0.015615453943610191, -0.0005902133416384459, 0.004763379227370024, 0.00035166682209819555, 0.0009077575523406267, 0.003888854291290045, 0.03221629932522774, -0.0008679810562171042, 0.004224542994052172, 6.875243707327172e-05, 0.0018782311817631125, -0.0006020342698320746, 0.02080642618238926, -0.001612057094462216, 0.010779098607599735, 0.0658872053027153, 0.022940538823604584, 0.05856532230973244, -0.0006286994321271777, 0.006864599417895079, 0.005000787787139416, 0.015544276684522629, -0.0003120523761026561, 0.0013845545472577214, 0.0001444939262000844, 0.0017779365880414844, -0.0007188726449385285, 0.008600659668445587, 0.0005183896282687783, -0.0008290224359370768, -0.0007311484660021961, 0.014397190883755684, 0.011711809784173965, -0.0021474147215485573, -0.0005355316097848117, -0.0014325937954708934, 0.0006560228066518903, -0.0012495431583374739, 0.027354197576642036, 0.0037063274066895247, -0.0013997716596350074, 0.006324842106550932, 0.0017208583885803819, 0.005532537121325731, 0.031642891466617584, 0.00604071794077754, -0.0003265303384978324, 0.007595816161483526, 0.0025301550049334764, -0.0014634676044806838, 0.05412417650222778, -0.0016137284692376852, 0.003757254686206579, 0.006792319007217884, 0.004583214409649372, 0.02952910028398037, -0.00161573791410774, 0.007000246085226536, -3.690201629069634e-05, 0.0014961493434384465, -0.0003765663132071495, 0.011404789984226227, -0.0012242747470736504, 0.005641014780849218, 0.0017603103769943118, 0.02662530727684498, -0.000667381624225527, -0.006384423468261957, 0.004013686440885067, -0.0008388075511902571, -0.00048409015289507806, 0.02090262994170189, 0.007406810764223337, -0.0008694863063283265, 0.0024173203855752945, 0.005911189131438732, 0.008723467588424683, 0.0017178398557007313, 0.00040167145198211074, -0.0008983205771073699, -0.00195355829782784, 0.005181255284696817, 0.008214869536459446, -0.002905926201492548, 0.010615745559334755, 0.007767522241920233, 0.0069669028744101524, -0.00018236473260913044, 0.008499919436872005, 0.0280158594250679, 0.04021702706813812, 0.0020493250340223312, 0.0024070965591818094, -0.000790123944170773, 0.0009434068924747407, 0.007409390527755022, 0.023084642365574837, -0.00013911016867496073, -0.0002998920972459018, 0.005620945710688829, 0.020047027617692947, 0.000956845935434103, -0.000769367499742657, 0.008684313856065273, 0.049112554639577866, 7.2604620072525e-05, -0.0038983349222689867, 0.0024554680567234755, -0.0025433283299207687, 0.0008831844315864146, 0.003585251746699214, 0.016859421506524086, 0.02799256332218647, 0.02032845839858055, 0.0013679603580385447, 0.006119819357991219, -0.0008274030406028032, -0.00013619728269986808, 0.0019594766199588776, 0.030847229063510895, 0.0103719811886549, 0.028831573203206062, 0.0010604654671624303, 0.025505030527710915, -0.000990379136055708, 0.0014822621596977115, 0.0042288233526051044, 0.0036390600726008415, -0.0006151203415356576, 0.01103669498115778, 0.0011785782407969236, 0.012958642095327377, -0.008285215124487877, 0.01545760128647089, -0.0013961518416181207, 0.0034681567922234535, 0.007458792999386787, 0.0022245391737669706, 0.00823445525020361, -0.00031522236531600356, 0.003908095881342888, -0.0008474212372675538, 0.0011457777582108974, 0.0033959958236664534, -0.001850135624408722, 0.003697051899507642, 0.012757380492985249, 0.0011246324284002185, -0.00018593489949125797, -0.0013822157634422183, -0.003435435239225626, -0.0013907402753829956, 0.018625326454639435, -0.00019678659737110138, 0.0018263745587319136, 0.00986185111105442, 0.010287339799106121, 0.0033554250840097666, -0.001080652349628508, 0.005743546411395073, 0.014047659002244473, 0.013218102045357227, 0.00487113744020462, -0.0006078829756006598, -0.00042490544728934765, 9.072136890608817e-05, 0.06378781050443649, 0.015192166902124882, 0.003847389714792371, -0.0023395607713609934, 0.01856188289821148, 0.055816683918237686, -2.414039772702381e-05, 0.011874379590153694, 0.04002068191766739, 0.002040320308879018, 0.0062705762684345245, 0.0023221964947879314, 0.002335590310394764, -0.0011128250043839216, 0.0004165288701187819, -4.156602517468855e-05, -0.001949345227330923, 0.0014037672663107514, 0.00013543205568566918, 0.007336639799177647, 0.0006092007970437407, 0.00025772181106731296, 0.022972341626882553, -0.0010144674452021718, 0.01828068494796753, 0.023407939821481705, -0.0010756617411971092, -0.0012039383873343468, 0.003745847847312689, -0.0007464751251973212, -0.0003512201365083456, 0.0001389150129398331, -9.609176777303219e-05, -0.002576422644779086, 0.005774304736405611, 0.0013203510316088796, 0.01775381714105606, 0.0047750165686011314, -0.0006462272722274065, 0.005770732648670673, -0.00037394053651951253, -1.1086329323006794e-05, 0.007954791188240051, -0.0020867474377155304, 0.1279563456773758, 0.013878162018954754, -0.00046438182471320033, 0.04777057468891144, 0.009792439639568329, 0.015595820732414722, 0.015647688880562782, 0.04721301794052124, -0.0015999177703633904, 0.009463366121053696, -0.0018790819449350238, 0.0011763068614527583, 0.0018173521384596825, -0.004137271083891392, 0.002649633912369609, -0.0002983848098665476, 0.007699266541749239, 0.0002159840805688873, 0.03033965453505516, -0.0004255330131854862, -0.0010560478549450636, 0.008819038979709148, 0.019516995176672935, -5.6041317293420434e-05, 0.004976149648427963, 0.02905713953077793, 0.01739054173231125, -0.00024991229292936623, 0.0009842893341556191, 0.005389000289142132, 0.026575807482004166, 0.005252469331026077, 0.0003198864287696779, -0.00012226277613081038, -9.345164289698005e-05, -3.68921464541927e-05, -0.0008268792880699039, 0.0013303461018949747, 0.00015135377179831266, -0.0004050159768667072, -0.0014535430818796158, 0.008297353982925415, 0.008615459315478802, -0.005840670317411423, -0.0001366728829452768, -0.00361080514267087, 0.006894989870488644, 0.014066940173506737, -0.0008435338968411088, -0.0009090231615118682, 0.012387544848024845, 0.002909761155024171, 0.014701391570270061, -0.00030257971957325935, 0.0022389020305126905, 0.0034764360170811415, 0.008522537536919117, -0.0005499974358826876, -0.002025148132815957, 0.003701074281707406, 0.021926172077655792, -0.0003445666516199708, 0.012136911042034626, -0.0014318848261609674, -0.0007168834563344717, 0.0023503745906054974, -0.0003232501621823758, 0.01996789313852787, 0.04119933769106865, 0.012947328388690948, 0.0008064117282629013, 0.0005316965980455279, 0.0214980635792017, 0.03452839329838753, -0.00082544976612553, 0.008359147235751152, -0.00028430981910787523, 0.00046303743147291243, -0.0008511546766385436, 0.009226256050169468, 0.00289178011007607, 0.000911607057787478, -0.0004240610869601369, -0.0009560579201206565, -0.0006911691161803901, 0.016714338213205338, 0.017234498634934425, 0.014365650713443756, -0.00045501277782022953, 0.0026550800539553165, 0.00041341225733049214, 0.015613541007041931, 0.0030680978670716286, 0.008967469446361065, 0.0034088497050106525, 0.004223192576318979, 0.04360993951559067, -0.000990739674307406, 0.030584776774048805, 0.001644617528654635, 0.016612695530056953, -0.00018000220006797463, 0.017817165702581406, 0.00035760574974119663, 0.010133360512554646, 0.007014049217104912, 0.02160799130797386, -0.00048499711556360126, -0.0023664997424930334, 0.014910134486854076, 0.0009057412389665842, 0.0010486877290531993, -0.0009279579389840364, -0.0006879628053866327, 0.0038385132793337107, 0.051843903958797455, 0.016078203916549683, -0.0005142869777046144, -0.0021968288347125053, 0.08127592504024506, 0.0006553464336320758, 0.0023943486157804728, 0.018265578895807266, -0.0004266184405423701, 0.0006569148390553892, 0.0004282988957129419, 0.018264221027493477, 0.02415398508310318, 0.0009909559739753604, 0.022248566150665283, 0.008550119586288929, 0.018146198242902756, 0.0152673851698637, 0.000529816432390362, 0.0011020953534170985, -0.0011871949536725879, 0.010942011140286922, -0.0008726061787456274, 0.000174920613062568, 0.006521561183035374, -0.001302041462622583, 0.007200801745057106, 0.0035099016968160868, 0.012659832835197449, 0.0003231677401345223, -0.0005920790135860443, -0.00018927526252809912, 0.007239262107759714, 0.003935996443033218, 0.01866684854030609, 0.0054181646555662155, 0.0024594604037702084, 0.004552340600639582, 0.0060944021679461, 0.02208416908979416, 0.008884718641638756, -0.0028484270442277193, 0.03444775938987732, 0.003777378937229514, 0.002011467469856143, 0.0003978342283517122, -0.0012356796069070697, -0.0006430522771552205, -0.001439801650121808, 0.0036914870142936707, -0.0003625231620389968, 2.7118255729874363e-06, 0.0009078587172552943, 3.98432785004843e-05, -0.0034918920136988163, 0.002995637711137533, 0.001546718180179596, 0.0017080794787034392, 0.0059743705205619335, 0.0056166695430874825, -0.0014982310822233558, -0.0005860887467861176, -0.0019094105809926987, 0.023296935483813286, 0.0063005900010466576, 0.006024859379976988, 0.002997433301061392, 0.03350882604718208, -0.0005939054535701871, 0.011548507958650589, -0.0015338922385126352, -0.0005861020763404667, 4.202367927064188e-05, 0.10037257522344589, 0.03972673788666725, -0.0010735734831541777, 0.004569161217659712, 0.00031148039852268994, 0.004579402972012758, 0.04501596465706825, 0.013474026694893837, 0.014882625080645084, 0.016541996970772743, 0.01615227945148945, 0.0005993650411255658, -0.0004379907331895083, -0.0015725496923550963, 0.026920907199382782, -0.00015909181092865765, 0.0011342010693624616, 0.00925670750439167, -0.00036567647475749254, 0.02074928767979145, 0.014704984612762928, -0.0005686256336048245, 0.039248138666152954, -0.0010044453665614128, 0.0036784913390874863, 0.004122321959584951, 0.02280168980360031, 0.021068710833787918, -3.814638330368325e-05, -0.0003325233410578221, 0.0021901994477957487, -0.0014542554272338748, 0.008410231210291386, 0.007405098527669907, 0.0012092458782717586, 0.010109031572937965, -0.0012386769521981478, 0.009099721908569336, 0.008733261376619339, -0.0027657044120132923, 0.01008539367467165, 0.0035807774402201176, 0.003881308948621154, 0.013076141476631165, -0.000750221312046051, 0.019247189164161682, 0.028127649798989296, 0.00465010991320014, 0.034532904624938965, 0.0009104625205509365, -0.0005603097379207611, 0.020060496404767036, 0.002190652769058943, 0.007813912816345692, 0.00021508547069970518, 0.002844792092218995, 0.008333448320627213, 0.004759013187140226, -1.7267526573050418e-06, -0.000744196237064898, 0.00023033285106066614, 0.0006557467277161777, -0.002310933079570532, 0.003737647319212556, 0.005420303903520107, 2.9016777261858806e-05, -0.0006487275823019445, -0.0010486363898962736, -0.0010598087683320045, -0.004481388255953789, 0.0023871599696576595, 0.006893967743963003, -0.0005141206784173846, 0.013114984147250652, 0.008937785401940346, 0.024985777214169502, -0.0005390794249251485, 0.0007772173848934472, 0.011856460943818092, -0.0019369024084880948, 0.021751143038272858, -0.0012264387914910913, 0.014846286736428738, 0.004652762785553932, 0.008063237182796001, 0.021946169435977936, 0.030102398246526718, -0.0010834215208888054, -0.00036897449172101915, -2.1929869035375305e-05, -0.004773246124386787, 0.0009391069179400802, 0.009167913347482681, -0.00046885019401088357, 0.000762833864428103, 0.02127135917544365, 0.004154288675636053, -0.0007521712686866522, 0.002390584908425808, 6.012694211676717e-05, 0.000509659294039011, -0.0028114672750234604, 0.01048306841403246, 0.006676908582448959, 0.011007738299667835]]}
@vintrocode
Copy link
Author

I spotted one issue in app.py. In the code below...

@app.route("/vectorize")
def vectorize():
    content = request.args.get('q')

request.args.get() returns a single value, the first if there are multiple. The solution is to change it to request.args.getlist().

This creates another issue because when the temp file is written out, it's expecting a string instead of a list. I chose not to pursue fixing this because I figured it would cause more downstream errors.

It's unclear to me whether or not the text_processing and encoding functions can handle multiple sentences. If they can, what's the format they expect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@vintrocode and others