Initial commit
This commit is contained in:
99
rpa_vision_v3/examples/example_ui_detection.py
Normal file
99
rpa_vision_v3/examples/example_ui_detection.py
Normal file
@@ -0,0 +1,99 @@
|
||||
()
|
||||
main
|
||||
n__": == "__maiif __name__")
|
||||
|
||||
70}\n(f"{'='*
|
||||
print")vec succèsnée armi te Détectionint("")
|
||||
pr"{'='*70}int(fpr
|
||||
n")
|
||||
_path}\é: {outputuvegard"✓ Sa print(f_path)
|
||||
ions, outputge, detectctions(imaize_dete.visualor
|
||||
detection...")isualisaton de la vnt(f"Créati
|
||||
pried.png"stem}_detectge_path)."{Path(imant / fre).pah(image_path= Patput_path out
|
||||
serali # Visu()
|
||||
|
||||
print ]}")
|
||||
r'{det['centee: f" Centrint(
|
||||
pr")['bbox']}on: {detPositi(f" print}")
|
||||
dence']:.3f['confie: {detnfianct(f" Co prin)
|
||||
'label']}"}. {det[{iint(f" pr1):
|
||||
detections, te(ra enume in for i, det)
|
||||
|
||||
:\n" élémentsons)}cti(deteé {len\n✓ Trouv print(f"e)
|
||||
|
||||
lements(imagui_ect_tor.detens = detectioec detUI...")
|
||||
nts des élémetionecDét"rint(
|
||||
pnts UIélémecter les # Déte
|
||||
|
||||
êt\n")-v2 pr OWLint("✓)
|
||||
prold=0.05threshdence_r(confitectowlDetor = Oetec")
|
||||
d2...ion d'OWL-vInitialisat print("
|
||||
tecteurle dé # Créer
|
||||
|
||||
e}\n")image.sizargée: { Image ch print(f"✓
|
||||
age_path)open(ime.ag image = Im}")
|
||||
{image_path: t de l'imagef"Chargemen print(
|
||||
ger l'imagehar # C
|
||||
|
||||
n")='*70}\"{' print(f -v2")
|
||||
UI avec OWLion ect" Détprint(f")
|
||||
n{'='*70}int(f"\
|
||||
prgv[1]
|
||||
= sys.are_path imag else:
|
||||
th
|
||||
= test_path image_pa}")
|
||||
_pathest créée: {tge de testint(f"✓ Ima pr
|
||||
path)st_(teave img.sg"
|
||||
reenshot.pn"test_ui_sc/ e__).parent th(__fil = Pa_pathst
|
||||
te t)
|
||||
5), font=fon255, 255, 25l=( text, fil), tyxt((tx,draw.te h) // 2
|
||||
(y2 - y1 - ty = y1 + t - tw) // 2
|
||||
(x2 - x1 x = x1 + t1]
|
||||
3] - bbox[ = bbox[ th ]
|
||||
[2] - bbox[0ox tw = bb
|
||||
font=font) 0), text, bbox((0,w.textox = dra bb )
|
||||
=2 width),50=(50, 50, tline=color, ou2, y2], fille([x1, y1, xglrectandraw. tons:
|
||||
olor in butxt, cy2, te, x2, r x1, y1 fo
|
||||
default()
|
||||
nt.load_= ImageFo font :
|
||||
ept exc, 20)
|
||||
f"aVuSans.tte/dejavu/Dejruetyp/t/share/fonts("/usrtypeont.true ImageFont = f
|
||||
y:tr
|
||||
]
|
||||
|
||||
100)),100, 200, OK", ("00, 200, , 2, 15050 (),
|
||||
100, 100), ", (255Cancel0, 100, "0, 40 (250, 5,
|
||||
50, 255)), (100, 1t""Submi 200, 100,, 50, 50 (
|
||||
uttons = [ bons
|
||||
es boutiner quelqu # Dess
|
||||
aw(img)
|
||||
eDraw.Drraw = Imag)
|
||||
d40, 240)240, 2r=(0), colo', (600, 40new('RGBImage. img =
|
||||
|
||||
geFontgeDraw, ImamaL import I from PItest
|
||||
ne image de r u # Crée
|
||||
)
|
||||
st..."image de tetion d'une éarint("\nCr pe_path>")
|
||||
magon.py <i_detectiexample_uithon3 sage: pynt("U pri) < 2:
|
||||
gvsys.ar if len(ain():
|
||||
r
|
||||
|
||||
def mwlDetectoimport Otector n.owl_deore.detectiofrom ct Image
|
||||
L impor
|
||||
|
||||
from PIent))nt.parare_).pPath(__file_t(0, str(path.inserath
|
||||
sys. parent au piree réperto
|
||||
# Ajouter l
|
||||
mport Pathhlib i
|
||||
from patimport sys"""
|
||||
|
||||
shot.png
|
||||
entest_screes/mpl.py exaectionet_ui_dpleam/exxamplesthon3 eple:
|
||||
py
|
||||
|
||||
Exemth>paage_.py <imctionle_ui_detes/exampplethon3 exam
|
||||
pye:
|
||||
Usagvec OWL-v2
|
||||
a'Éléments UIion détectoncret: D
|
||||
Exemple C
|
||||
"""python3/env #!/usr/bin
|
||||
160
rpa_vision_v3/examples/test_action_execution_simple.py
Normal file
160
rpa_vision_v3/examples/test_action_execution_simple.py
Normal file
@@ -0,0 +1,160 @@
|
||||
)
|
||||
xit(main()sys.e :
|
||||
ain__''__m__name__ == if rn 1
|
||||
|
||||
|
||||
retu" * 60)
|
||||
"=fo(er.in logg LED")
|
||||
} tests FAIssed{total - pa.error(f"✗ logger:
|
||||
else return 0
|
||||
|
||||
* 60)fo("="ogger.in)
|
||||
lSED" PASestsll tr.info("✓ A loggetotal:
|
||||
= passed = if
|
||||
d")
|
||||
sts passel} tesed}/{totapaslts: {nfo(f"Resuger.i log(results)
|
||||
tal = len
|
||||
tosults)sed = sum(re
|
||||
pas60)"=" * \n" + ("info logger.)
|
||||
|
||||
nd(Falseresults.appe =True)
|
||||
_info{e}", excashed: __} crt.__namest {tesf"Ter.error(ogge las e:
|
||||
eption except Exc
|
||||
pend(result)lts.ap resu ()
|
||||
testesult = ry:
|
||||
trts:
|
||||
st in tesr te[]
|
||||
fo results =
|
||||
|
||||
|
||||
]statusution_exec test_on_types,
|
||||
est_acti t reation,
|
||||
xecutor_cction_e test_a
|
||||
creation,lver_t_resot_targe tes ts,
|
||||
t_impor tess = [
|
||||
test)
|
||||
|
||||
=" * 60fo(" logger.infied)")
|
||||
(Simpli Tests n Execution6 - ActioPhase ger.info("60)
|
||||
log=" * ger.info("log""
|
||||
sts." all te"Run
|
||||
""ef main():
|
||||
dalse
|
||||
|
||||
return F}")
|
||||
{efailed: eck ch"✗ Statuser.error(f loggs e:
|
||||
ion apt Except exceurn True
|
||||
ret
|
||||
)
|
||||
available"ion statusesecutll ex("✓ Ager.infolog
|
||||
")
|
||||
D.value}_NOT_FOUNGETtus.TARxecutionStaT_FOUND = {ET_NOatus.TARGEExecutionSt" fo(fger.in loglue}")
|
||||
TIMEOUT.vaStatus.utionecEOUT = {ExTIMionStatus.ecut" Exer.info(fgg
|
||||
lolue}")s.FAILED.vaecutionStatu = {Ex.FAILEDtatus ExecutionSo(f"nf logger.i alue}")
|
||||
SUCCESS.vtionStatus.cu= {Exetus.SUCCESS nSta" Executioer.info(flogg
|
||||
|
||||
onStatust Executior importion_executecution.acrom core.ex f try:
|
||||
|
||||
|
||||
==")tus =n StaExecutio Testing ==o("\n=inflogger."""
|
||||
m.atus enuStExecution"""Test ):
|
||||
tatus(_sexecutionf test_
|
||||
|
||||
dese
|
||||
return Fal {e}")
|
||||
ion failed: ion creatActrror(f"✗ .e logger
|
||||
tion as e:cept Excep exrue
|
||||
n T retur
|
||||
)
|
||||
on.params}"rams: {acti(f" Pager.info logrole}")
|
||||
n.target.by__role={actiot: by Targef"fo(.inlogger
|
||||
")ype.value}ion.tted: {acteacr Action fo(f"✓ logger.in
|
||||
)
|
||||
}
|
||||
r_ms': 500it_aftearams={'wa p
|
||||
arget,=t targetICK,
|
||||
SE_CLonType.MOU type=Acti
|
||||
on(cti action = A irst")
|
||||
licy="fn_poectioutton", selt_bmile="subpec(by_ro = TargetStarget n
|
||||
actioa simple reate # C
|
||||
")
|
||||
e}OUND.valuCOMPpe.onTyD = {ActiMPOUN.COonTypef" Actiogger.info( l)
|
||||
e}"luUT.vaEXT_INPonType.T= {ActiXT_INPUT pe.TE" ActionTyo(finf logger.ue}")
|
||||
SE_CLICK.valMOUe. {ActionTyp =MOUSE_CLICKionType.nfo(f" Actogger.i le enum
|
||||
ctionTypest A # T
|
||||
|
||||
tSpec, TargectionTypection, At Agraph impor.workflow_.modelsfrom core
|
||||
try:)
|
||||
|
||||
="pes ==on Tyng Actiti=== Tesnfo("\n.i logger
|
||||
""."enumsnType ctioon and A"Test Acti "":
|
||||
on_types()_acti
|
||||
|
||||
def testFalse
|
||||
return e}")
|
||||
n failed: {Creatioor(f"✗ ger.err log
|
||||
n as e: Exceptio excepturn True
|
||||
ret
|
||||
)
|
||||
ms)"_timeout_ms}ultcutor.defatimeout={exer created (ionExecutofo(f"✓ Act logger.in 00)
|
||||
ms=30eout_fault_timnExecutor(de = Actioxecutor e
|
||||
utor
|
||||
t ActionExececutor imporn.action_ex.executiorom core f:
|
||||
try=")
|
||||
|
||||
ion ==utor CreatxecActionE= Testing ==.info("\nlogger"""
|
||||
n.ioiator instantxecutTest ActionE
|
||||
"""reation():_executor_ct_actiondef tes
|
||||
|
||||
False
|
||||
turn
|
||||
re")ailed: {e}ation fCreerror(f"✗ logger.
|
||||
ion as e:t Exceptexceprue
|
||||
return T
|
||||
ld})")
|
||||
reshoty_th.similariolver{reshold=res(thated lver creetResofo(f"✓ Targinogger. l
|
||||
)shold=0.8arity_threr(similgetResolve= Tar resolver
|
||||
er
|
||||
esolvt TargetRlver impor.target_resotionecue.exrom cor f try:
|
||||
|
||||
=")
|
||||
Creation ==Resolverrget= Testing Tao("\n==gger.inf lo"""
|
||||
tiation.nstanver iTargetResol""Test ():
|
||||
"ionsolver_creatst_target_re
|
||||
|
||||
|
||||
def te Falsern retu")
|
||||
ed: {e} Import failr.error(f"✗logge ion as e:
|
||||
cept except Exn True
|
||||
uret
|
||||
r ted")
|
||||
ls impordew mofloWorkfo("✓ ger.in log ec
|
||||
, TargetSpTypetiont Action, Ac imporaphkflow_grworls.m core.mode fro
|
||||
")
|
||||
importedonExecutor✓ Actigger.info(" loonStatus
|
||||
uti Execor,tionExecutt Acutor importion_execacion.re.execut from co
|
||||
|
||||
imported")er solv✓ TargetRer.info("logge et
|
||||
rgedTaolvr, ResesolveargetRimport Ter solvt_reon.targeore.executi from c try:
|
||||
|
||||
=")
|
||||
mports === Testing I("\n==ger.info"
|
||||
loged.""portcan be imall modules t tha """Test
|
||||
mports():est_i
|
||||
def t_)
|
||||
|
||||
r(__name_oggelogging.getLer =
|
||||
loggO)ng.INFggivel=loicConfig(le
|
||||
logging.basgging
|
||||
import loarent))
|
||||
|
||||
.parent.pile__)th(__f(Pastrsert(0, path.inth
|
||||
sys.port Pahlib imfrom patrt sys
|
||||
po"
|
||||
|
||||
imcies.
|
||||
""dependenh minimal ver witTargetResoland ionExecutor
|
||||
Tests Acted)
|
||||
(Simplifise 6 Phation - ction ExecuTest A
|
||||
n3
|
||||
"""thopyv /bin/en#!/usr
|
||||
210
rpa_vision_v3/examples/test_openclip_owl_integration.py
Normal file
210
rpa_vision_v3/examples/test_openclip_owl_integration.py
Normal file
@@ -0,0 +1,210 @@
|
||||
t()
|
||||
s !")
|
||||
prinlee VRAIS modèntenant dutilise maion V3 RPA Visisystèmet("🎉 Le rint()
|
||||
princision")
|
||||
peilleure préur mnCV poète OpeCompl(" -
|
||||
printUI")d'éléments zero-shot - Détection(" printetector")
|
||||
ns UIDnctionnel dat foégré e✅ OWL-v2 int
|
||||
print(")
|
||||
print()toires !"éaalecteurs lus de vint(" - P
|
||||
praires)")ings similbeddres → emaimilages sivérifiée (imnce - Cohérerint(" ")
|
||||
prme L2 = 1)(nosés gs normaliEmbeddinnt(" - r")
|
||||
priildeeEmbeddingBus Stattionnel dant fonc eintégréCLIP int("✅ Openint()
|
||||
pr * 70)
|
||||
pr"="")
|
||||
print(Testsumé des " Rés)
|
||||
print(" * 70t("=rin
|
||||
p====
|
||||
================================================================= =======sumé
|
||||
#====
|
||||
# Ré====================================================================
|
||||
# ====t()
|
||||
prin(1)
|
||||
|
||||
ys.exit()
|
||||
sprint_excback.
|
||||
trace traceback importe}")
|
||||
EC Test 2: {nt(f"❌ ÉCHpri:
|
||||
eption as et Excré")
|
||||
excepgno(" Test i
|
||||
print)0"=4.35.mers>ll transforpip instan: tiollaInstaprint(" : {e}")
|
||||
n disponible-v2 not(f"⚠️ OWLe:
|
||||
prinrror as ImportE
|
||||
|
||||
exceptement")e correcttionn-v2 foncÉUSSI: OWL Test 2 Rt("\n✅rin
|
||||
p elle")
|
||||
fonctionntion OWL-v2 t("✓ Détec prine:
|
||||
els")
|
||||
?) trop élevé(seuil détecté élémentcun Au print("⚠️ s) == 0:
|
||||
detectionn(owl_ le if
|
||||
|
||||
ox']}") @ {det['bb3f}ce']:.iden{det['conf}: abel']{i}. {det['lt(f" prin
|
||||
ons, 1):etectiate(owl_der det in enumfor i,")
|
||||
s:nt élémeections)}len(owl_detcté {v2 a déte"✓ OWL-(f print
|
||||
g)
|
||||
(test_imentstect_ui_elemr.dector.owl_detens = detectowl_detectio
|
||||
o-v2...") OWLion avecétectst de drint("\nTe pWL
|
||||
avec Oon directeectiTest de dét #
|
||||
")
|
||||
tectorsé dans UIDeialiinit OWL-v2 "✓ print( else:
|
||||
oré")
|
||||
Test ign(" print")
|
||||
.0354.mers>=forstall transpip in: ationtallt(" Insinpr
|
||||
nquant?)")masformers ible (trant pas dispon OWL-v2 n'es⚠️ print(" None:
|
||||
ctor is wl_deteector.o if detisé
|
||||
alL est initiue OWier q Vérif
|
||||
#ig)
|
||||
(config=conftectorDeUIetector = d
|
||||
|
||||
)
|
||||
=0.05hresholdnce_t owl_confide test
|
||||
cever VLM pour # Désaction=False,ficatilm_classi use_v on=True,
|
||||
ectil_det use_ow ig(
|
||||
ctionConffig = Dete")
|
||||
conec OWL-v2...avUIDetector tion du Créat("\nv2
|
||||
prin avec OWL-urteréer détec
|
||||
# C
|
||||
h}")t_pat {tes créée:mage de testrint(f"✓ I ph)
|
||||
patsave(test_mg.t_ites
|
||||
.png"ionl_integrat"test_ownt / file__).pareath(__h = P test_patr
|
||||
Sauvegarde
|
||||
# ont)
|
||||
), font=f555, 2=(255, 25ill fubmit","S15), xt((150, 1aw.te
|
||||
dr()
|
||||
load_defaultgeFont.nt = Ima fo
|
||||
except:f", 16)
|
||||
Sans.ttejavu/DejaVupe/dfonts/truetyr/share/etype("/ust.trumageFon = I font
|
||||
try:xte
|
||||
jouter te # A
|
||||
|
||||
, width=2)50, 50)line=(50, 5), out, 150, 2500, fill=(1(button_rectectangleraw.r d150]
|
||||
, 00, 2500, 1n_rect = [10tto bu
|
||||
nbouto un iner# Dess
|
||||
)
|
||||
w(test_imgageDraw.Dra draw = Im , 240))
|
||||
(240, 240lor= co400, 300),('RGB', ( Image.new_img =test")
|
||||
de test...ne imageion d'u("Créat printouton
|
||||
un b test avecimage der une # Créeor
|
||||
|
||||
OwlDetectort detector impction.owl_ore.detem c fronConfig
|
||||
Detectioector, t UIDetr imporetectoi_dection.ucore.det from ry:
|
||||
|
||||
t-" * 70)
|
||||
int("r")
|
||||
pr UIDetectov2 dans 2: OWL-int("Test===
|
||||
|
||||
pr===================================================================or
|
||||
# ======ctdans UIDeteL-v2 st 2: OW# Te========
|
||||
==================================================================nt()
|
||||
|
||||
# ==pri(1)
|
||||
|
||||
sys.exit nt_exc()
|
||||
eback.prik
|
||||
traccebacra import t 1: {e}")
|
||||
HEC Test ÉCf"❌int( pras e:
|
||||
xception
|
||||
except E
|
||||
ement")ectorrctionne conIP f OpenCL1 RÉUSSI:est "\n✅ T
|
||||
print(
|
||||
")ngs vérifiéebeddince des emohéret("✓ C prin
|
||||
(1)
|
||||
s.exitsy ")
|
||||
imilaritéplus de s avoir evraientes dmilairsi: Images "❌ ÉCHEC print(sim_13:
|
||||
= if sim_12 <
|
||||
}")
|
||||
sim_13:.4fouge-bleu: {Similarité r" rint(f
|
||||
p_12:.4f}")uge: {sime-roroug Similarité int(f" pr
|
||||
ntes
|
||||
différe Images 3) #ot(emb1, embnp.d13 = sim_
|
||||
ess similair Image) #, emb2ot(emb1= np.dim_12 nus
|
||||
s cosiarité# Simil
|
||||
3)
|
||||
image_image(.embedderclip_embedbuilder. emb3 = age2)
|
||||
bed_image(imedder.em.clip_emb= builder2 1)
|
||||
embimage(imagembed_r.elip_embeddebuilder.c= emb1
|
||||
|
||||
# Bleu255)) 0, =(0, 224), color, ', (224GBw('R3 = Image.ne imageire
|
||||
mila Rouge si10, 10)) #=(255, 224), color', (224,'RGBe.new(age2 = Imag imuge
|
||||
# Ro0, 0)) , 55), color=(2(224, 224('RGB', = Image.new
|
||||
image1nce...") cohéredet("\nTest in prilaires
|
||||
dings sim embedavoirivent es doairimages similcohérence: # Test de
|
||||
")
|
||||
m:.4f}) {text_norrme =ormalisé (note nedding texmb"✓ Ent(f
|
||||
pri t(1)
|
||||
xi sys.e f}")
|
||||
norm:.4= {text_xte edding te l'embrme de ÉCHEC: Not(f"❌ prin 1.01):
|
||||
< < text_norm.99 ot (0
|
||||
if n g)
|
||||
ext_embeddinlg.norm(tp.linaext_norm = n tton")
|
||||
("butmbed_text_embedder.eder.clipdding = built_embe texe...")
|
||||
ing de text'embeddst d"\nTe( printe texte
|
||||
dd'embedding
|
||||
# Test
|
||||
4f})"){norm:.é (norme = ormalisng nddi"✓ Emberint(f
|
||||
|
||||
pxit(1) sys.e)
|
||||
normalisé"n léatoire nocteur aà un ve ressemble Cela" print(1.0)")
|
||||
ndu ~atte4f} ( {norm:.edding =emborme de l'"❌ ÉCHEC: Nrint(f
|
||||
p< 1.01):m 99 < nort (0. if no
|
||||
|
||||
g)bedding.norm(emm = np.linal 1)
|
||||
nore L2 =norms (séormalisont nP dings CLImbed # Les e normale
|
||||
distributione t unatoires onléteurs a # Les vectoire
|
||||
vecteur aléa PAS un est que ce n'# Vérifier
|
||||
_image)
|
||||
stimage(tebed__embedder.emr.clipilde bu embedding =
|
||||
|
||||
, 150, 200)) color=(100, 224),24RGB', (2ge.new(' Ima_image =")
|
||||
testd'image...d'embedding "\nTest nt(
|
||||
priimageng d'd'embeddist
|
||||
# Te ")
|
||||
dderCLIPEmbelise age utiim✓ Embedder print("
|
||||
(1)
|
||||
sys.exit
|
||||
Embedder")st pas CLIPage n'er imembedde ÉCHEC: L'nt("❌ pri:
|
||||
der)LIPEmbedimage"), C"t(embedders.gelder.tance(buif not isins iCLIP
|
||||
tilisent mbedders u les erifier que
|
||||
# Vé")
|
||||
lderbeddingBuidans StateEmisé initialOpenCLIP✓ t(" prin1)
|
||||
|
||||
sys.exit(")
|
||||
initialisés LIP n'est paCHEC: OpenC print("❌ É
|
||||
s None:der i.clip_embed buildersé
|
||||
ifali initiIP estifier que CL
|
||||
# VérTrue)
|
||||
lip=uilder(use_cddingBmbeateE Stlder =ui b)
|
||||
enCLIP..."er avec OpddingBuild StateEmbeéation du print("CrOpenCLIP
|
||||
ec builder avr un # Crée
|
||||
dder
|
||||
IPEmber import CL_embeddeclipding..embed from corelder
|
||||
beddingBuiport StateEmimbuilder g_ddinate_embeing.stre.embeddfrom co:
|
||||
|
||||
|
||||
try * 70)"-"")
|
||||
print(erdingBuildteEmbedtaans SP dnCLIt 1: Opent("Tes
|
||||
pri===
|
||||
====================================================================== ===Builder
|
||||
#eEmbeddingans StatenCLIP dest 1: Op# T===
|
||||
=====================================================================
|
||||
|
||||
# ====)
|
||||
print()"=" * 70")
|
||||
print(LIP + OWL-v2enCOpn 'IntégratioTest dt("
|
||||
prin"=" * 70)
|
||||
|
||||
print(umpy as npt npor
|
||||
imageFontraw, Im ImageDrt Image,mpo
|
||||
from PIL int))
|
||||
.parent.pareth(__file__)str(Pa.insert(0, thsys.pa au path
|
||||
arentertoire péper le r Ajout
|
||||
|
||||
#Pathib import om pathlport sys
|
||||
fr"
|
||||
|
||||
im
|
||||
""aléatoires.e vecteurs au lieu dutilisés t modèles sone les vrais
|
||||
Vérifie qu + OWL-v2
|
||||
n OpenCLIPtégratio d'In
|
||||
Test"""ython3
|
||||
in/env p#!/usr/b
|
||||
129
rpa_vision_v3/examples/test_workflow_synthetic.py
Normal file
129
rpa_vision_v3/examples/test_workflow_synthetic.py
Normal file
@@ -0,0 +1,129 @@
|
||||
)
|
||||
else 1ccess t(0 if su sys.exi = main()
|
||||
successin__":
|
||||
== "__mae__
|
||||
if __nam
|
||||
|
||||
return True
|
||||
")
|
||||
ruction.pyow_const/test_workflon examplesthce: py. Lan.info(" 3gger")
|
||||
losessionapture une 2. C(" er.infoogg")
|
||||
l.1:5000//127.0.0nce http:. La 1" r.info(
|
||||
loggeion GUI:")e sessune vraiester avec Pour t("foinger. log)
|
||||
P réels."LI Cembeddingses dn utilise sessio Cettete: No("\nℹ️nfo logger.iings
|
||||
ddur les embe Note s #
|
||||
)
|
||||
} edges"low.edges)en(workfdes, {lnoes)} nodn(workflow.kflow: {leinfo(f"Worogger. l" * 70)
|
||||
o("=infogger.")
|
||||
lÉUSSIEST Rfo("✓ T logger.in" * 70)
|
||||
" + "=.info("\noggerumé
|
||||
l
|
||||
# Rés
|
||||
)}")ata_storeager.metadn(faiss_mandonnées: {le(f" - Métagger.info)
|
||||
lontotal}"er.index.ss_manag: {fai Vecteursinfo(f" -ogger.")
|
||||
lS:FAISndex \nI"gger.info( lo
|
||||
|
||||
_count}")ationdge.observions: {e Observat - er.info(f" loggype}")
|
||||
n.tioe.actn: {edg - Actio.info(f" logger _id}")
|
||||
ge.to_node{edid} → e.from_node_d}: {edge.edge_i" {edgr.info(f loggees:
|
||||
orkflow.edgin we or edg
|
||||
f")étectés:ges dfo("\nEdr.inlogge
|
||||
|
||||
rity}")_similacosine.min_mbeddingate.eode.templreshold: {n" - Thgger.info(f lo nt}")
|
||||
coution_servas: {node.obationservf" - Oblogger.info(
|
||||
e}")amd}: {node.ne_i {node.nod" fo( logger.inf
|
||||
odes:ow.nde in workflor no")
|
||||
ftectés:des dé"\nNo.info( logger")
|
||||
|
||||
résultatsdes ] Analyse 4/4.info("\n[ logger
|
||||
er résultatsysape 4: Anal
|
||||
# ÉtFalse
|
||||
return xc()
|
||||
print_ek.tracebac ack
|
||||
cebrt tra impour: {e}")
|
||||
rre✗ Ef"ror(gger.er loion as e:
|
||||
ptExcept exces)}")
|
||||
orkflow.edgen(wEdges: {lef" - gger.info( lodes)}")
|
||||
ow.non(workfl- Nodes: {leinfo(f" logger.
|
||||
_id}")low.workflowrkfnstruit: {woow cokflfo(f"✓ Worlogger.in low")
|
||||
hetic Workf"Synton, n(sessissiofrom_seer.build_ow = buildworkfl try:
|
||||
")
|
||||
workflowtion du ] Construc"\n[3/4ger.info(og lflow
|
||||
ire work 3: ConstruÉtape # ")
|
||||
|
||||
sétialihBuilder iniapnfo("✓ Grr.ilogge )
|
||||
ires
|
||||
atoeddings aléif pour embrmisslus pe0.20 # Pstering_eps= clu rns
|
||||
s 3 patteter noec dét# Bas pourns=2, etitiorn_rep_pattein m
|
||||
,aiss_managerger=ffaiss_mana
|
||||
lder(aphBui = Grbuilder=512)
|
||||
(dimensionsager FAISSMannager =mas_is falder")
|
||||
hBuiGrapation du tialisIni] o("\n[2/4ogger.infr
|
||||
laphBuilder Gr 2: Créepe Éta
|
||||
#
|
||||
session()etic_nth = create_sy sessione")
|
||||
ynthétiqu sa session ldetion /4] Créanfo("\n[1gger.i lo
|
||||
synthétiqueionCréer sesspe 1: # Éta
|
||||
* 70)
|
||||
" nfo("=gger.i)
|
||||
loHÉTIQUE"SESSION SYNTSTRUCTION - W CONKFLO"TEST WORer.info( logg70)
|
||||
" * "=o( logger.inf"""
|
||||
al.ncipprit d'entrée in""Po ":
|
||||
def main()sion
|
||||
|
||||
|
||||
n ses retur")
|
||||
shotss)} screennshotree(session.scc {lenvee a crééion"✓ Sessr.info(fge
|
||||
loghot)
|
||||
(screensndnshots.appecree session.s)
|
||||
)
|
||||
rmat(w().isofotetime.noured_at=da capt ,
|
||||
ng"{i:03d}.pts/screen_a/screenshoth=f"datative_pa rel
|
||||
:03d}","screen_{iot_id=fcreensh s(
|
||||
eenshothot = Scr screens ):
|
||||
12 in range(
|
||||
for i 8, 11
|
||||
hots 2, 5,eensn C: screr
|
||||
# Patt 10s 1, 4, 7,creenshotttern B: s Pa 9
|
||||
#, 3, 6,enshots 0A: scre# Pattern un)
|
||||
hacois crépétés (4 fatterns s avec 3 pscreenshotr 12 # Simule
|
||||
)
|
||||
|
||||
at()rmfosonow().ime.=datetied_attart s
|
||||
,"}ntheticsy": "ext={"typ conte",
|
||||
"test_user user=,
|
||||
e}st": Truux", "te"lin={"os": vironment
|
||||
en0",on="v3._versi agent,
|
||||
001""synthetic_session_id=
|
||||
ssion(sion = RawSe
|
||||
seséss répétotdes screenshion avec une sess# Créer
|
||||
")
|
||||
ique...synthétion session d'une fo("Créatin logger.""
|
||||
s." testque pour lesétion synth une sessi """Créer awSession:
|
||||
Ron() ->ssietic_sesynthte_rea
|
||||
|
||||
def c
|
||||
__name__).getLogger(ogging
|
||||
logger = l
|
||||
)message)s' - %((levelname)ss - %ime)at='%(asct formO,
|
||||
ging.INF level=logConfig(
|
||||
ng.basicr
|
||||
|
||||
logginageport FAISSMaager ims_mandding.fais core.embefromext
|
||||
onthot, WindowCcreensession, SRawSimport session ls.raw_ore.mode
|
||||
from chBuilder import Grapraph_builder.graph.goreom cnt))
|
||||
|
||||
frparent.pare(__file__).ath(0, str(P.insertsys.pathdatetime
|
||||
|
||||
me import tetiath
|
||||
from da import Pm pathliblogging
|
||||
fro
|
||||
import ysort s
|
||||
imp""
|
||||
ession.
|
||||
" se vraiepturer unin de caoir beso
|
||||
sans avilderGraphBuester le pour tynthétiquee session srée unpt ce scri
|
||||
Cthétique
|
||||
ssion Syn Selow avecn de Workftiotrucst de Cons""
|
||||
Te
|
||||
"hon3v pytbin/en#!/usr/
|
||||
Reference in New Issue
Block a user