Upload 4 files
Browse files
man.py
CHANGED
@@ -2176,8 +2176,8 @@ class Man :
|
|
2176 |
if local_attrs[attr] in ( 'random','none'):
|
2177 |
local_attrs[attr] = random.choice(man_description[attr][1:])
|
2178 |
|
2179 |
-
pt=f'A {local_attrs["character"]} Man with {local_attrs["eye_color"]} Eyes ,{local_attrs["hair_style"]} And {local_attrs["hair_color"]} Hair and
|
2180 |
-
return pt+"\n"+hashTagsaMan(pt)
|
2181 |
def shortStr(self):
|
2182 |
attrs = man_description.keys()
|
2183 |
#print(man_description.items())
|
@@ -2219,13 +2219,16 @@ def _randomActionMan(pt:str):
|
|
2219 |
upper_attire=random.choice (man_description["upper_attire"][1:])
|
2220 |
s=action[:-1] + "and with "+ upper_attire + " and " " Dress ."
|
2221 |
pts=pt.split(".")
|
2222 |
-
if len (pts)>2:pts[-
|
2223 |
else:pts.insert(1,s )
|
2224 |
-
|
|
|
2225 |
|
2226 |
|
2227 |
|
2228 |
|
|
|
|
|
2229 |
def randomActionMan(w):
|
2230 |
if not isinstance(w,Man):return _randomActionMan(w)
|
2231 |
w.action=randomPlace().shortStr()
|
@@ -2325,15 +2328,13 @@ def testMan():
|
|
2325 |
print(w2)
|
2326 |
print (w1.toJson())
|
2327 |
print (w2.toJson())
|
2328 |
-
sw1=str(w1)
|
2329 |
w3=ManFromString(sw1)
|
2330 |
print(sw1)
|
2331 |
print(w3)
|
2332 |
-
print(randomActionMan(sw1))
|
2333 |
print(randomActionMan(w3))
|
2334 |
|
2335 |
-
|
2336 |
-
print(randManWoman())
|
2337 |
|
2338 |
if __name__=="__main__":
|
2339 |
testMan()
|
|
|
2176 |
if local_attrs[attr] in ( 'random','none'):
|
2177 |
local_attrs[attr] = random.choice(man_description[attr][1:])
|
2178 |
|
2179 |
+
pt=f'A {local_attrs["character"]} Man with {local_attrs["eye_color"]} Eyes ,{local_attrs["hair_style"]} And {local_attrs["hair_color"]} Hair and {local_attrs["skin"]} Skin, {local_attrs["physique"]} Body .And a preference for {local_attrs["upper_attire"]} Dress,and {local_attrs["action"][:-1]} .'
|
2180 |
+
return pt+"\n"+hashTagsaMan(pt )
|
2181 |
def shortStr(self):
|
2182 |
attrs = man_description.keys()
|
2183 |
#print(man_description.items())
|
|
|
2219 |
upper_attire=random.choice (man_description["upper_attire"][1:])
|
2220 |
s=action[:-1] + "and with "+ upper_attire + " and " " Dress ."
|
2221 |
pts=pt.split(".")
|
2222 |
+
if len (pts)>2:pts[-1]=s
|
2223 |
else:pts.insert(1,s )
|
2224 |
+
ls=hashTagsPlace1(action)
|
2225 |
+
return ".".join (pts)+" #".join(ls)
|
2226 |
|
2227 |
|
2228 |
|
2229 |
|
2230 |
+
|
2231 |
+
|
2232 |
def randomActionMan(w):
|
2233 |
if not isinstance(w,Man):return _randomActionMan(w)
|
2234 |
w.action=randomPlace().shortStr()
|
|
|
2328 |
print(w2)
|
2329 |
print (w1.toJson())
|
2330 |
print (w2.toJson())
|
2331 |
+
sw1=str(w1)
|
2332 |
w3=ManFromString(sw1)
|
2333 |
print(sw1)
|
2334 |
print(w3)
|
|
|
2335 |
print(randomActionMan(w3))
|
2336 |
|
2337 |
+
|
|
|
2338 |
|
2339 |
if __name__=="__main__":
|
2340 |
testMan()
|
pets.py
CHANGED
@@ -311,7 +311,7 @@ class Animal:
|
|
311 |
local_attrs[attr] = random.choice(pet_description[attr][1:])
|
312 |
|
313 |
#pt=f'A {local_attrs["name"]} with {local_attrs["eyes"]} Eyes And {local_attrs["skin"]} Skin and {local_attrs["physique"]} Body. {local_attrs["place"]}..'
|
314 |
-
pt=f'A {local_attrs["name"]} Animal with {local_attrs["eyes"]} Eyes
|
315 |
return pt+"\n"+hashTagsaAnimal(pt)
|
316 |
def shortStr(self):
|
317 |
attrs = pet_description.keys()
|
@@ -322,7 +322,7 @@ class Animal:
|
|
322 |
if local_attrs[attr] in( 'random','none'):
|
323 |
local_attrs[attr] = random.choice(man_description[attr][1:])
|
324 |
|
325 |
-
pt=f'A {local_attrs["name"]} Animal with {local_attrs["eyes"]} Eyes
|
326 |
return pt
|
327 |
|
328 |
def toJson(self):
|
@@ -385,7 +385,7 @@ def hashTagsaAnimal(w):
|
|
385 |
if not isinstance(w,Animal):w=AnimalFromString(w)
|
386 |
body=("".join ([x.capitalize() for x in w.physique.split()[-2:] ])+"Body").replace ("-","")
|
387 |
name=("".join ([x.capitalize() for x in w.name.split()[-2:] ])).replace ("-","")
|
388 |
-
ls=[
|
389 |
for x in ls:
|
390 |
if x.strip() in HashTagsDict:
|
391 |
ls.append(HashTagsDict[x.strip()])
|
@@ -396,7 +396,7 @@ def hashTagsaAnimal1(w):
|
|
396 |
body=("".join ([x.capitalize() for x in w.physique.split()[-2:] ])+"Body").replace ("-","")
|
397 |
name=("".join ([x.capitalize() for x in w.name.split()[-2:] ])).replace ("-","")
|
398 |
|
399 |
-
return [
|
400 |
|
401 |
def animalPromptUI(*args):
|
402 |
w=animalPrompt(*args)
|
|
|
311 |
local_attrs[attr] = random.choice(pet_description[attr][1:])
|
312 |
|
313 |
#pt=f'A {local_attrs["name"]} with {local_attrs["eyes"]} Eyes And {local_attrs["skin"]} Skin and {local_attrs["physique"]} Body. {local_attrs["place"]}..'
|
314 |
+
pt=f'A {local_attrs["name"]} Animal with {local_attrs["eyes"]} Eyes. And it is {local_attrs["action"]}.'
|
315 |
return pt+"\n"+hashTagsaAnimal(pt)
|
316 |
def shortStr(self):
|
317 |
attrs = pet_description.keys()
|
|
|
322 |
if local_attrs[attr] in( 'random','none'):
|
323 |
local_attrs[attr] = random.choice(man_description[attr][1:])
|
324 |
|
325 |
+
pt=f'A {local_attrs["name"]} Animal with {local_attrs["eyes"]} Eyes. '
|
326 |
return pt
|
327 |
|
328 |
def toJson(self):
|
|
|
385 |
if not isinstance(w,Animal):w=AnimalFromString(w)
|
386 |
body=("".join ([x.capitalize() for x in w.physique.split()[-2:] ])+"Body").replace ("-","")
|
387 |
name=("".join ([x.capitalize() for x in w.name.split()[-2:] ])).replace ("-","")
|
388 |
+
ls=[name ]
|
389 |
for x in ls:
|
390 |
if x.strip() in HashTagsDict:
|
391 |
ls.append(HashTagsDict[x.strip()])
|
|
|
396 |
body=("".join ([x.capitalize() for x in w.physique.split()[-2:] ])+"Body").replace ("-","")
|
397 |
name=("".join ([x.capitalize() for x in w.name.split()[-2:] ])).replace ("-","")
|
398 |
|
399 |
+
return [ name ]
|
400 |
|
401 |
def animalPromptUI(*args):
|
402 |
w=animalPrompt(*args)
|
places.py
CHANGED
@@ -26,7 +26,7 @@ class Place:
|
|
26 |
if local_attrs[attr] in( 'random','none'):
|
27 |
local_attrs[attr] = random.choice(place_description[attr][1:])
|
28 |
|
29 |
-
pt=f'{local_attrs["place"]}
|
30 |
return pt+"\n"+hashTagsPlace(pt)
|
31 |
def shortStr(self):
|
32 |
attrs = place_description.keys()
|
@@ -36,7 +36,7 @@ class Place:
|
|
36 |
for attr in attrs:
|
37 |
if local_attrs[attr] in( 'random','none'):
|
38 |
local_attrs[attr] = random.choice(place_description[attr][1:])
|
39 |
-
pt=f'{local_attrs["
|
40 |
return pt
|
41 |
|
42 |
def toJson(self):
|
@@ -95,7 +95,8 @@ def hashTagsPlace(w):
|
|
95 |
if not isinstance(w,Place):w=PlaceFromString(w)
|
96 |
body=("".join ([x.capitalize() for x in w.physique.split()[-2:] ])+"View").replace ("-","")
|
97 |
name=("".join ([x.capitalize() for x in w.name.split()[-2:] ])).replace ("-","")
|
98 |
-
|
|
|
99 |
for x in ls:
|
100 |
if x.strip() in HashTagsDict:
|
101 |
ls.append(HashTagsDict[x.strip()])
|
@@ -104,9 +105,10 @@ def hashTagsPlace(w):
|
|
104 |
def hashTagsPlace1(w):
|
105 |
if not isinstance(w,Place):w=PlaceFromString(w)
|
106 |
body=("".join ([x.capitalize() for x in w.physique.split()[-2:] ])+"View").replace ("-","")
|
107 |
-
name=("".join ([x.capitalize() for x in w.name.split()[-2:] ])).replace ("-","")
|
|
|
108 |
|
109 |
-
return [name ,body]
|
110 |
|
111 |
def placePromptUI(*args):
|
112 |
w=placePrompt(*args)
|
|
|
26 |
if local_attrs[attr] in( 'random','none'):
|
27 |
local_attrs[attr] = random.choice(place_description[attr][1:])
|
28 |
|
29 |
+
pt=f'{local_attrs["place"]} ,{local_attrs["name"]} , {local_attrs["physique"]} View. '
|
30 |
return pt+"\n"+hashTagsPlace(pt)
|
31 |
def shortStr(self):
|
32 |
attrs = place_description.keys()
|
|
|
36 |
for attr in attrs:
|
37 |
if local_attrs[attr] in( 'random','none'):
|
38 |
local_attrs[attr] = random.choice(place_description[attr][1:])
|
39 |
+
pt=f'{local_attrs["action"]}, {local_attrs["place"]} at {local_attrs["name"]} with {local_attrs["physique"]} View .'
|
40 |
return pt
|
41 |
|
42 |
def toJson(self):
|
|
|
95 |
if not isinstance(w,Place):w=PlaceFromString(w)
|
96 |
body=("".join ([x.capitalize() for x in w.physique.split()[-2:] ])+"View").replace ("-","")
|
97 |
name=("".join ([x.capitalize() for x in w.name.split()[-2:] ])).replace ("-","")
|
98 |
+
pose=("".join ([x.strip().capitalize() for x in w.action.split()[-3:] ])).replace ("-","")
|
99 |
+
ls=[name,body ,pose]
|
100 |
for x in ls:
|
101 |
if x.strip() in HashTagsDict:
|
102 |
ls.append(HashTagsDict[x.strip()])
|
|
|
105 |
def hashTagsPlace1(w):
|
106 |
if not isinstance(w,Place):w=PlaceFromString(w)
|
107 |
body=("".join ([x.capitalize() for x in w.physique.split()[-2:] ])+"View").replace ("-","")
|
108 |
+
name=("".join ([x.capitalize() for x in w.name.split()[-2:] ])).replace ("-","")
|
109 |
+
pose=("".join ([x.capitalize() for x in w.action.split()[-3:] ])).replace ("-","")
|
110 |
|
111 |
+
return [name ,body,pose]
|
112 |
|
113 |
def placePromptUI(*args):
|
114 |
w=placePrompt(*args)
|
women1.py
CHANGED
@@ -11908,7 +11908,7 @@ class Woman:
|
|
11908 |
for attr in attrs:
|
11909 |
if local_attrs[attr] == 'random':
|
11910 |
local_attrs[attr] = random.choice(woman_description[attr])
|
11911 |
-
pt0=f'A {local_attrs["character"]} Woman with {local_attrs["eye_color"]},{local_attrs["hair_style"]} And {local_attrs["hair_color"]} Hair and a preference for {local_attrs["dress_upper"]} and {local_attrs["dress_styles"]} Dress,{local_attrs["skin"]} Skin, {local_attrs["body"]} Body,{local_attrs["breast_size"]} Breasts
|
11912 |
|
11913 |
for k,v in local_attrs.items():
|
11914 |
if v in Translator:
|
@@ -11947,8 +11947,8 @@ class Woman:
|
|
11947 |
if local_attrs[attr] in ( 'random','none'):
|
11948 |
local_attrs[attr] = random.choice(woman_description[attr][1:])
|
11949 |
|
11950 |
-
pt=f'A {local_attrs["character"]} Woman with {local_attrs["eye_color"]} Eyes
|
11951 |
-
return pt+"\n"+hashTags(pt)
|
11952 |
|
11953 |
def shortStr(self):
|
11954 |
attrs = [
|
@@ -11992,18 +11992,36 @@ def womanPromptUI(*args):
|
|
11992 |
return str(w)
|
11993 |
|
11994 |
|
11995 |
-
def _randomAction(pt:str):
|
|
|
|
|
11996 |
action=randomPlace().shortStr()
|
|
|
11997 |
#random.choice (woman_description['action'][1:])
|
11998 |
dress_styles=random.choice (woman_description["dress_styles"][1:])
|
11999 |
dress_upper=random.choice (woman_description["dress_upper"][1:])
|
12000 |
-
s=action[:-1] + "and with "+ dress_upper + "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12001 |
pts=pt.split(".")
|
12002 |
-
if len (pts)>
|
12003 |
-
|
12004 |
-
|
|
|
|
|
|
|
12005 |
|
|
|
|
|
|
|
12006 |
|
|
|
12007 |
|
12008 |
|
12009 |
def randomAction(w):
|
@@ -12186,16 +12204,11 @@ def testWoman():
|
|
12186 |
print (w1.toJson())
|
12187 |
print (w2.toJson())
|
12188 |
sw1=str(w1).replace(".",",")+"."
|
12189 |
-
w3=WomanFromString(sw1)
|
12190 |
-
print(sw1)
|
12191 |
print(w3)
|
12192 |
-
print(randomAction(sw1))
|
12193 |
print(randomAction(w3))
|
12194 |
-
|
12195 |
-
|
12196 |
-
print (w1.toS())
|
12197 |
-
print (w2.toS())
|
12198 |
-
print(hashTags(str(w2)))
|
12199 |
|
12200 |
|
12201 |
if __name__=="__main__":
|
|
|
11908 |
for attr in attrs:
|
11909 |
if local_attrs[attr] == 'random':
|
11910 |
local_attrs[attr] = random.choice(woman_description[attr])
|
11911 |
+
pt0=f'A {local_attrs["character"]} Woman with {local_attrs["eye_color"]},{local_attrs["hair_style"]} And {local_attrs["hair_color"]} Hair and a preference for {local_attrs["dress_upper"]} and {local_attrs["dress_styles"]} Dress,{local_attrs["skin"]} Skin, {local_attrs["body"]} Body,{local_attrs["breast_size"]} Breasts . Additional,{local_attrs["additional"]} , {local_attrs["action"]}'
|
11912 |
|
11913 |
for k,v in local_attrs.items():
|
11914 |
if v in Translator:
|
|
|
11947 |
if local_attrs[attr] in ( 'random','none'):
|
11948 |
local_attrs[attr] = random.choice(woman_description[attr][1:])
|
11949 |
|
11950 |
+
pt=f'A {local_attrs["character"]} Woman with {local_attrs["eye_color"]} Eyes and {local_attrs["hair_style"]} And {local_attrs["hair_color"]} Hair and {local_attrs["skin"]} Skin and {local_attrs["body"]} Body,{local_attrs["breast_size"]} Breasts .And a preference for {local_attrs["dress_upper"]} Dress, and {local_attrs["action"][:-1]} .'
|
11951 |
+
return pt+"\n"+hashTags(pt )
|
11952 |
|
11953 |
def shortStr(self):
|
11954 |
attrs = [
|
|
|
11992 |
return str(w)
|
11993 |
|
11994 |
|
11995 |
+
def _randomAction(pt:str,name="random"):
|
11996 |
+
pts=pt.split(".")
|
11997 |
+
if len (pts)>1:name=PlaceFromString(pts[1]).name
|
11998 |
action=randomPlace().shortStr()
|
11999 |
+
|
12000 |
#random.choice (woman_description['action'][1:])
|
12001 |
dress_styles=random.choice (woman_description["dress_styles"][1:])
|
12002 |
dress_upper=random.choice (woman_description["dress_upper"][1:])
|
12003 |
+
s=action[:-1] + "and with "+ dress_upper + " Dress "
|
12004 |
+
|
12005 |
+
if len (pts)>1:pts.insert(1,s)
|
12006 |
+
else:pts.apend(action)
|
12007 |
+
ls=hashTagsPlace1(action)
|
12008 |
+
return ".".join (pts) +" #".join(ls)
|
12009 |
+
|
12010 |
+
|
12011 |
+
def randomActionKeepName(pt:str,name="random"):
|
12012 |
pts=pt.split(".")
|
12013 |
+
if len (pts)>1:name=PlaceFromString(pts[1]).name
|
12014 |
+
action=randomPlace(name=name ).shortStr()
|
12015 |
+
#random.choice (woman_description['action'][1:])
|
12016 |
+
dress_styles=random.choice (woman_description["dress_styles"][1:])
|
12017 |
+
dress_upper=random.choice (woman_description["dress_upper"][1:])
|
12018 |
+
s=action[:-1] + "and with "+ dress_upper + " Dress "
|
12019 |
|
12020 |
+
if len (pts)>1:pts[1]=action
|
12021 |
+
else:pts.apend(action)
|
12022 |
+
return ".".join (pts)
|
12023 |
|
12024 |
+
|
12025 |
|
12026 |
|
12027 |
def randomAction(w):
|
|
|
12204 |
print (w1.toJson())
|
12205 |
print (w2.toJson())
|
12206 |
sw1=str(w1).replace(".",",")+"."
|
12207 |
+
w3=str(WomanFromString(sw1))
|
|
|
12208 |
print(w3)
|
|
|
12209 |
print(randomAction(w3))
|
12210 |
+
|
12211 |
+
# print(hashTags(str(w2)))
|
|
|
|
|
|
|
12212 |
|
12213 |
|
12214 |
if __name__=="__main__":
|