cha0smagick
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -6,24 +6,116 @@ from PIL import Image
|
|
6 |
from io import BytesIO
|
7 |
|
8 |
# Definir listas de datos para la generaci贸n aleatoria
|
9 |
-
first_names = [
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
"
|
21 |
-
"
|
22 |
-
"
|
23 |
-
"
|
24 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
]
|
26 |
-
complexion_descriptions = ["Gui帽apo", "Muy flaco", "Flaco", "Normal", "Fornido", "Ancho", "Gordo", "Obeso"]
|
27 |
|
28 |
# Funci贸n para generar un personaje
|
29 |
def generate_character():
|
@@ -46,9 +138,6 @@ def generate_character():
|
|
46 |
"Concept": random.choice(concepts),
|
47 |
"Description": generate_description(),
|
48 |
"Background": generate_background(),
|
49 |
-
"Ugliness": random.choice(ugliness_levels),
|
50 |
-
"Physical Traits": random.choice(physical_traits),
|
51 |
-
"Complexion": random.choice(complexion_descriptions),
|
52 |
"Attributes": {attr: random.randint(1, 5) for attr in [
|
53 |
"Intelligence", "Wits", "Resolve", "Strength", "Dexterity",
|
54 |
"Stamina", "Presence", "Manipulation", "Composure"
|
@@ -101,31 +190,138 @@ def generate_character():
|
|
101 |
# Funci贸n para generar una descripci贸n del personaje
|
102 |
def generate_description():
|
103 |
character_traits = [
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
return random.choice(character_traits)
|
112 |
|
113 |
# Funci贸n para generar un background de personaje basado en sus atributos
|
114 |
def generate_background():
|
115 |
backgrounds = [
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
return random.choice(backgrounds)
|
124 |
|
125 |
# Funci贸n para generar una imagen a partir del prompt
|
126 |
def generate_image(prompt):
|
127 |
# Aqu铆 debes llamar a la funci贸n adecuada de freeGPT para generar la imagen
|
128 |
-
return Client.create_generation("
|
129 |
|
130 |
# Inicializar la aplicaci贸n
|
131 |
st.title("Character Creator for MAGE")
|
@@ -194,57 +390,55 @@ if st.session_state.character_sheet:
|
|
194 |
<p>Concept: {character_sheet["Concept"]}</p>
|
195 |
<p>Background: {character_sheet["Background"]}</p>
|
196 |
<p>Description: {character_sheet["Description"]}</p>
|
197 |
-
<p>Ugliness: {character_sheet["Ugliness"]}</p>
|
198 |
-
<p>Physical Traits: {character_sheet["Physical Traits"]}</p>
|
199 |
-
<p>Complexion: {character_sheet["Complexion"]}</p>
|
200 |
<h2>Attributes</h2>
|
201 |
<table>
|
202 |
<tr><th>Attribute</th><th>Value</th></tr>
|
203 |
-
{''.join(f
|
204 |
</table>
|
205 |
<h2>Talents</h2>
|
206 |
<table>
|
207 |
<tr><th>Talent</th><th>Value</th></tr>
|
208 |
-
{''.join(f
|
209 |
</table>
|
210 |
<h2>Skills</h2>
|
211 |
<table>
|
212 |
<tr><th>Skill</th><th>Value</th></tr>
|
213 |
-
{''.join(f
|
214 |
</table>
|
215 |
<h2>Knowledges</h2>
|
216 |
<table>
|
217 |
<tr><th>Knowledge</th><th>Value</th></tr>
|
218 |
-
{''.join(f
|
219 |
</table>
|
220 |
<h2>Spheres</h2>
|
221 |
<table>
|
222 |
<tr><th>Sphere</th><th>Value</th></tr>
|
223 |
-
{''.join(f
|
224 |
</table>
|
225 |
<h2>Advantages</h2>
|
226 |
<table>
|
227 |
<tr><th>Type</th><th>Value</th></tr>
|
228 |
-
{''.join(f
|
229 |
</table>
|
230 |
<h2>Health</h2>
|
231 |
<table>
|
232 |
-
<tr><th>
|
233 |
-
{''.join(f
|
234 |
</table>
|
235 |
<h2>Backgrounds</h2>
|
236 |
<table>
|
237 |
-
<tr><th>
|
238 |
-
{''.join(f
|
239 |
</table>
|
240 |
<h2>Other Traits</h2>
|
241 |
<p>Quirks: {character_sheet["Other Traits"]["Quirks"]}</p>
|
242 |
</body>
|
243 |
</html>
|
244 |
"""
|
245 |
-
|
246 |
-
href = f'<a href="data:text/html;base64,{b64}" download="character_sheet.html">Download Character Sheet</a>'
|
247 |
-
return href
|
248 |
|
249 |
-
# Bot贸n para descargar
|
250 |
-
|
|
|
|
|
|
|
|
6 |
from io import BytesIO
|
7 |
|
8 |
# Definir listas de datos para la generaci贸n aleatoria
|
9 |
+
first_names = [
|
10 |
+
"Alex", "Jordan", "Taylor", "Morgan", "Jamie", "Casey",
|
11 |
+
"Samantha", "Derek", "Robin", "Jessie", "Chris", "Kendall",
|
12 |
+
"Quinn", "Riley", "Taylor", "Dakota", "Hayden", "Avery",
|
13 |
+
"Skylar", "Emerson", "Parker", "Sage", "Tatum", "Reese",
|
14 |
+
"Cameron", "Blake", "Finley", "Rowan", "Jaden", "Hayley",
|
15 |
+
"Taylor", "Casey", "Phoenix", "Sydney", "Sloane", "Briar",
|
16 |
+
"Emery", "Kylie", "Aiden", "Charlie", "Sawyer", "Zoe"
|
17 |
+
]
|
18 |
+
|
19 |
+
last_names = [
|
20 |
+
"Smith", "Johnson", "Williams", "Brown", "Jones", "Garcia",
|
21 |
+
"Morrison", "Taylor", "Murphy", "Anderson", "Parker", "Harris",
|
22 |
+
"Martinez", "Clark", "Robinson", "Young", "Scott", "Hill",
|
23 |
+
"Green", "Adams", "Baker", "Nelson", "Carter", "Mitchell",
|
24 |
+
"Perez", "Hall", "Rivera", "Torres", "Sanchez", "Ramirez",
|
25 |
+
"Jenkins", "Wood", "Gray", "Hughes", "Price", "Washington",
|
26 |
+
"Butler", "Dixon", "Castillo", "Curtis", "Perry", "James"
|
27 |
+
]
|
28 |
+
|
29 |
+
natures = [
|
30 |
+
"Explorer", "Protector", "Rebel", "Visionary",
|
31 |
+
"The Caregiver", "The Leader", "The Outcast", "The Jester",
|
32 |
+
"The Sage", "The Innocent", "The Rebel", "The Hero",
|
33 |
+
"The Martyr", "The Survivor", "The Revolutionary", "The Scholar",
|
34 |
+
"The Thinker", "The Artisan", "The Strategist", "The Idealist",
|
35 |
+
"The Mystic", "The Seeker", "The Guardian", "The Anarch",
|
36 |
+
"The Puppetmaster", "The Manipulator", "The Dilettante", "The Conformist",
|
37 |
+
"The Realist", "The Fatalist", "The Loyalist", "The Trickster",
|
38 |
+
"The Warrior", "The Philosopher", "The Visionary", "The Sage",
|
39 |
+
"The Mentor", "The Visionary", "The Pacifist", "The Overachiever",
|
40 |
+
"The Wanderer", "The Shaman", "The Protector", "The Dreamer",
|
41 |
+
"The Outsider", "The Altruist", "The Creator", "The Sentinel",
|
42 |
+
"The Arbitrator", "The Heroic", "The Unseen", "The Quiet"
|
43 |
+
]
|
44 |
+
|
45 |
+
demeanors = [
|
46 |
+
"Daring", "Reserved", "Charming", "Stern",
|
47 |
+
"Introspective", "Imposing", "Mischievous", "Sympathetic",
|
48 |
+
"Stoic", "Charismatic", "Cunning", "Amiable",
|
49 |
+
"Discreet", "Sardonic", "Compassionate", "Skeptical",
|
50 |
+
"Bold", "Humorous", "Inquisitive", "Cautious",
|
51 |
+
"Noble", "Arrogant", "Witty", "Solitary",
|
52 |
+
"Flamboyant", "Pensive", "Protective", "Subdued",
|
53 |
+
"Confident", "Dramatic", "Pragmatic", "Thoughtful",
|
54 |
+
"Idealistic", "Tactful", "Defiant", "Skeptical",
|
55 |
+
"Empathetic", "Nonchalant", "Resilient", "Subtle",
|
56 |
+
"Passionate", "Assertive", "Dreamy", "Pragmatic",
|
57 |
+
"Eccentric", "Innovative", "Traditional", "Anarchic"
|
58 |
+
]
|
59 |
+
|
60 |
+
essences = [
|
61 |
+
"Dynamic", "Static",
|
62 |
+
"Entropic", "Liminal", "Feral", "Fixed",
|
63 |
+
"Fluid", "Mysterious", "Arcane", "Visceral",
|
64 |
+
"Transcendent", "Temporal", "Interdimensional", "Ethereal",
|
65 |
+
"Formless", "Formative", "Catalytic", "Refined",
|
66 |
+
"Raw", "Spiritual", "Profound", "Esoteric",
|
67 |
+
"Chaotic", "Cyclical", "Evolving", "Adaptive",
|
68 |
+
"Sentient", "Sentinel", "Aetheric", "Corporal",
|
69 |
+
"Somatic", "Resonant", "Transitory", "Abyssal",
|
70 |
+
"Informed", "Ineffable", "Vibrant", "Dimensional",
|
71 |
+
"Celestial", "Infernal", "Mythic", "Prosaic",
|
72 |
+
"Mystical", "Elemental", "Philosophical", "Causal"
|
73 |
+
]
|
74 |
+
|
75 |
+
affiliations = [
|
76 |
+
"Coven", "Coterie", "Circle", "Clan",
|
77 |
+
"Order of Hermes", "Virtual Adepts", "Sons of Ether", "Dreamspeakers",
|
78 |
+
"Verbena", "Akashic Brotherhood", "Cult of Ecstasy", "Hollow Ones",
|
79 |
+
"Sahajiya", "Euthanatos", "Order of the Invisible College", "Tremere",
|
80 |
+
"The Guardians of the Veil", "The Silver Ladder", "The Ordo Dracul", "The Akashics",
|
81 |
+
"The Hollow Ones", "The Progenitors", "The Sons of Ether", "The Dreamspeakers",
|
82 |
+
"The Verbena", "The Celestial Chorus", "The Order of Hermes", "The Order of the Silver Ladder",
|
83 |
+
"The Virtual Adepts", "The Cult of Ecstasy", "The Euthanatos", "The Thyrsus",
|
84 |
+
"The Akashic Brotherhood", "The Guardians of the Veil", "The Tremere", "The Silver Ladder",
|
85 |
+
"The Order of the Invisible College", "The Sons of Ether", "The Progenitors", "The Hollow Ones",
|
86 |
+
"The Seers of the Throne", "The Nephandi", "The Marauders", "The Ascended",
|
87 |
+
"The Circle of the Crone", "The Mystics", "The Order of the Silver Ladder", "The Ebonites"
|
88 |
+
]
|
89 |
+
|
90 |
+
sects = [
|
91 |
+
"The Camarilla", "Anarchs", "Independent", "Inconnu",
|
92 |
+
"The Ascension", "The Technocracy", "The Traditions", "The Syndicate",
|
93 |
+
"The Progenitors", "The Void Engineers", "The Syndicate", "The Collective",
|
94 |
+
"The Disparate", "The Enlightened", "The Nephandi", "The Marauders",
|
95 |
+
"The Celestial Chorus", "The Order of Hermes", "The Verbena", "The Dreamspeakers",
|
96 |
+
"The Euthanatos", "The Akashic Brotherhood", "The Cult of Ecstasy", "The Order of the Silver Ladder",
|
97 |
+
"The Guardians of the Veil", "The Hollow Ones", "The Sons of Ether", "The Order of the Invisible College",
|
98 |
+
"The Technocrats", "The Innovators", "The Artisan", "The Unseen",
|
99 |
+
"The Seekers", "The Traditionalists", "The Sentinels", "The Shadows",
|
100 |
+
"The Practitioners", "The Occultists", "The Exiles", "The Kin",
|
101 |
+
"The Forsaken", "The Watchers", "The Forgotten", "The Dreamers",
|
102 |
+
"The Acolytes", "The Explorers", "The Prophets", "The Liberators"
|
103 |
+
]
|
104 |
+
|
105 |
+
concepts = [
|
106 |
+
"The Reluctant Hero", "The Fallen Angel", "The Seeker", "The Scholar",
|
107 |
+
"The Chosen One", "The Prodigal Son", "The Suffering Saint", "The Vengeful Spirit",
|
108 |
+
"The Rebellious Outsider", "The Tragic Hero", "The Reluctant Leader", "The Unseen Savior",
|
109 |
+
"The Dark Knight", "The Sorrowful Prophet", "The Unlikely Hero", "The Tormented Soul",
|
110 |
+
"The Wayward Son", "The Forsaken Hero", "The Burdened Seeker", "The Visionary Leader",
|
111 |
+
"The Timeless Wanderer", "The Ascetic Mystic", "The Wounded Healer", "The Mad Genius",
|
112 |
+
"The Unconventional Thinker", "The Iconoclast", "The Keeper of Secrets", "The Altruistic Rebel",
|
113 |
+
"The Hidden Guardian", "The Disillusioned Dreamer", "The Insurgent", "The Ethereal Wanderer",
|
114 |
+
"The Reformed Shadow", "The Despondent Visionary", "The Fractured Reality", "The Lost Soul",
|
115 |
+
"The Fateful Encounter", "The Unwritten Legend", "The Broken Prophecy", "The Echo of Destiny",
|
116 |
+
"The Ascendant", "The Resilient Spirit", "The Guiding Light", "The Catalyst of Change",
|
117 |
+
"The Ethereal Guide", "The Awakened Seer", "The Harbinger of Truth", "The Eternal Nomad"
|
118 |
]
|
|
|
119 |
|
120 |
# Funci贸n para generar un personaje
|
121 |
def generate_character():
|
|
|
138 |
"Concept": random.choice(concepts),
|
139 |
"Description": generate_description(),
|
140 |
"Background": generate_background(),
|
|
|
|
|
|
|
141 |
"Attributes": {attr: random.randint(1, 5) for attr in [
|
142 |
"Intelligence", "Wits", "Resolve", "Strength", "Dexterity",
|
143 |
"Stamina", "Presence", "Manipulation", "Composure"
|
|
|
190 |
# Funci贸n para generar una descripci贸n del personaje
|
191 |
def generate_description():
|
192 |
character_traits = [
|
193 |
+
"They are exceptionally intelligent, often outsmarting their opponents.",
|
194 |
+
"With a heart of a protector, they stand firm against injustice.",
|
195 |
+
"Their rebellious nature leads them to challenge authority at every turn.",
|
196 |
+
"A visionary at heart, they can see possibilities where others see obstacles.",
|
197 |
+
"They can charm their way out of most situations with their charisma.",
|
198 |
+
"Often reserved, they observe more than they speak, learning the secrets around them.",
|
199 |
+
"Possessing a deep understanding of the Arcane, they often act as a mentor to others.",
|
200 |
+
"They are fiercely independent, valuing personal freedom above all.",
|
201 |
+
"Driven by curiosity, they are always eager to explore the unknown.",
|
202 |
+
"They have a mysterious aura that draws others in, yet keeps them at a distance.",
|
203 |
+
"Their analytical mind allows them to dissect problems and find creative solutions.",
|
204 |
+
"Deeply empathetic, they connect with others' emotions and struggles.",
|
205 |
+
"They have a knack for technology, often blending it with their magical abilities.",
|
206 |
+
"As natural leaders, they inspire those around them to achieve greatness.",
|
207 |
+
"A skeptic at heart, they question everything, even their own beliefs.",
|
208 |
+
"They possess a strong moral compass, guiding their actions in complex situations.",
|
209 |
+
"With a flair for the dramatic, they can turn any situation into a theatrical experience.",
|
210 |
+
"They are relentless in their pursuit of knowledge, often at the cost of personal relationships.",
|
211 |
+
"Their playful nature masks a deeper seriousness about their convictions.",
|
212 |
+
"They have a gift for persuasion, often swaying others to their point of view.",
|
213 |
+
"They approach life with a sense of wonder, finding joy in the mundane.",
|
214 |
+
"Their past traumas have shaped them into resilient survivors.",
|
215 |
+
"Incredibly resourceful, they can make the most out of limited resources.",
|
216 |
+
"They carry an air of confidence that instills trust in others.",
|
217 |
+
"Their creativity knows no bounds, often manifesting in unexpected ways.",
|
218 |
+
"They have a keen sense of timing, knowing exactly when to act or hold back.",
|
219 |
+
"Though they may appear aloof, they are deeply caring and protective of their loved ones.",
|
220 |
+
"They are often plagued by self-doubt, questioning their decisions and abilities.",
|
221 |
+
"They possess a rebellious spirit that fuels their desire for change.",
|
222 |
+
"Their humor is sharp, often using wit to defuse tense situations.",
|
223 |
+
"With a strong sense of justice, they often take on the role of the vigilante.",
|
224 |
+
"They are guided by their intuition, often trusting their instincts over logic.",
|
225 |
+
"A master of disguise, they can blend into any crowd or situation.",
|
226 |
+
"They have a tendency to overthink, leading to analysis paralysis.",
|
227 |
+
"Their loyalty to friends and allies is unwavering, often risking themselves for others.",
|
228 |
+
"They are fiercely competitive, striving to be the best in their field.",
|
229 |
+
"With an inquisitive mind, they never shy away from asking difficult questions.",
|
230 |
+
"They often act as peacemakers, striving to resolve conflicts amicably.",
|
231 |
+
"Their charm can be disarming, often helping them navigate social situations with ease.",
|
232 |
+
"They are introverted yet passionate, preferring deep conversations over small talk.",
|
233 |
+
"Possessing a strategic mind, they excel in planning and executing complex tasks.",
|
234 |
+
"They have a unique perspective on life, often seeing the world through a different lens.",
|
235 |
+
"Their idealism often clashes with harsh realities, leading to disillusionment.",
|
236 |
+
"They are deeply spiritual, often exploring the metaphysical aspects of existence.",
|
237 |
+
"They have an insatiable thirst for adventure, always seeking new experiences.",
|
238 |
+
"Their emotional depth allows them to connect with others on a profound level.",
|
239 |
+
"They often act impulsively, driven by passion rather than careful thought.",
|
240 |
+
"With a fierce will, they are determined to change the world around them.",
|
241 |
+
"They possess a natural talent for the arts, often expressing themselves creatively.",
|
242 |
+
"Their love for learning keeps them perpetually seeking new skills and knowledge.",
|
243 |
+
"They are natural diplomats, often able to mediate and resolve disputes.",
|
244 |
+
"With a profound understanding of human nature, they can read others like a book.",
|
245 |
+
"They often feel like outsiders, struggling to find their place in the world.",
|
246 |
+
"Their commitment to their beliefs makes them a formidable adversary.",
|
247 |
+
"They carry the weight of their responsibilities with grace and humility.",
|
248 |
+
"Their visionary ideas often inspire those around them to dream bigger.",
|
249 |
+
"They are intensely curious, often leading them into uncharted territory.",
|
250 |
+
"They value honesty above all else, believing that truth is paramount."
|
251 |
+
]
|
252 |
return random.choice(character_traits)
|
253 |
|
254 |
# Funci贸n para generar un background de personaje basado en sus atributos
|
255 |
def generate_background():
|
256 |
backgrounds = [
|
257 |
+
"A former soldier with a mysterious past.",
|
258 |
+
"An academic who delved too deep into forbidden knowledge.",
|
259 |
+
"A street-smart hustler with a knack for survival.",
|
260 |
+
"A gifted artist haunted by visions.",
|
261 |
+
"A diplomat with secrets that could alter the balance of power.",
|
262 |
+
"An explorer seeking ancient artifacts.",
|
263 |
+
"A former member of a secret society, now seeking redemption.",
|
264 |
+
"An orphan raised by a powerful mage, struggling with their legacy.",
|
265 |
+
"A gifted hacker who uncovers arcane truths hidden in the digital realm.",
|
266 |
+
"A former cult member, now escaping the shadow of their past.",
|
267 |
+
"An undercover agent working to expose dark magical practices.",
|
268 |
+
"A wanderer who has traveled through various realms and dimensions.",
|
269 |
+
"A historian specializing in lost civilizations and their magical practices.",
|
270 |
+
"A member of a powerful family, caught in a web of political intrigue.",
|
271 |
+
"A gifted healer with a tragic backstory, seeking to help others.",
|
272 |
+
"A former academic expelled for controversial theories on reality.",
|
273 |
+
"A refugee from a war-torn land seeking a new life.",
|
274 |
+
"An enigmatic bard whose songs contain hidden truths and prophecies.",
|
275 |
+
"A rogue time traveler with knowledge of future events.",
|
276 |
+
"A talented chef whose dishes are imbued with magical properties.",
|
277 |
+
"A former detective, now investigating supernatural occurrences.",
|
278 |
+
"An environmental activist with a deep connection to nature spirits.",
|
279 |
+
"A psychic medium, communicating with spirits to uncover secrets.",
|
280 |
+
"A former spy who has seen too much and is now on the run.",
|
281 |
+
"An inventor seeking to blend science and magic for new innovations.",
|
282 |
+
"A skilled negotiator with ties to multiple factions in the magical community.",
|
283 |
+
"A former priestess, now wielding their faith as a weapon against corruption.",
|
284 |
+
"An exiled noble with a claim to a lost throne.",
|
285 |
+
"A mystical cartographer mapping the hidden ley lines of the world.",
|
286 |
+
"A conspiracy theorist who has uncovered a deeper reality.",
|
287 |
+
"A former journalist exposing the dark side of magic.",
|
288 |
+
"An adept martial artist with a unique connection to their inner power.",
|
289 |
+
"A former librarian, now a guardian of ancient and forbidden texts.",
|
290 |
+
"A gifted musician whose melodies can manipulate emotions and reality.",
|
291 |
+
"A skilled thief with a penchant for magical artifacts.",
|
292 |
+
"A mentor figure, guiding young mages on their path to enlightenment.",
|
293 |
+
"A former criminal mastermind, now seeking atonement for past deeds.",
|
294 |
+
"An anthropologist studying ancient magical practices in remote cultures.",
|
295 |
+
"A former bodyguard for a powerful mage, now trying to carve their own path.",
|
296 |
+
"A gifted athlete, using their physical prowess to transcend limits.",
|
297 |
+
"A medium for a powerful spirit, navigating the complexities of the spirit world.",
|
298 |
+
"A cult leader with a vision for a new world order based on magical principles.",
|
299 |
+
"An archaeologist uncovering lost magical civilizations.",
|
300 |
+
"A naturalist who communes with the spirits of the land and animals.",
|
301 |
+
"A mentor to a group of fledgling mages, imparting wisdom and guidance.",
|
302 |
+
"A former politician whose ambitions led them to dabble in dark magic.",
|
303 |
+
"A gifted storyteller whose tales are woven with hidden truths.",
|
304 |
+
"A reformed hacker who now uses their skills to protect the innocent.",
|
305 |
+
"A former member of a powerful mage clan, seeking to break free from family ties.",
|
306 |
+
"A magical prodigy raised in isolation, now exploring the wider world.",
|
307 |
+
"An elemental shaman connected to the forces of nature.",
|
308 |
+
"A fallen angel seeking redemption in a world full of darkness.",
|
309 |
+
"A tragic hero, marked by loss yet driven by hope.",
|
310 |
+
"A gifted designer whose creations blend art and magic seamlessly.",
|
311 |
+
"A former employee of a megacorporation with ties to the occult.",
|
312 |
+
"An empathetic listener, helping others heal their emotional wounds.",
|
313 |
+
"A gifted strategist, often plotting several moves ahead in the game of power.",
|
314 |
+
"A wanderer between worlds, collecting stories from each realm.",
|
315 |
+
"An exiled mage from a distant land, seeking a new purpose.",
|
316 |
+
"A magical botanist discovering plants with unique magical properties.",
|
317 |
+
"A former member of a governing council, now advocating for change."
|
318 |
+
]
|
319 |
return random.choice(backgrounds)
|
320 |
|
321 |
# Funci贸n para generar una imagen a partir del prompt
|
322 |
def generate_image(prompt):
|
323 |
# Aqu铆 debes llamar a la funci贸n adecuada de freeGPT para generar la imagen
|
324 |
+
return Client.create_generation("prodia", prompt) # Ajusta esto si es necesario
|
325 |
|
326 |
# Inicializar la aplicaci贸n
|
327 |
st.title("Character Creator for MAGE")
|
|
|
390 |
<p>Concept: {character_sheet["Concept"]}</p>
|
391 |
<p>Background: {character_sheet["Background"]}</p>
|
392 |
<p>Description: {character_sheet["Description"]}</p>
|
|
|
|
|
|
|
393 |
<h2>Attributes</h2>
|
394 |
<table>
|
395 |
<tr><th>Attribute</th><th>Value</th></tr>
|
396 |
+
{''.join([f"<tr><td>{attr}</td><td>{value}</td></tr>" for attr, value in character_sheet["Attributes"].items()])}
|
397 |
</table>
|
398 |
<h2>Talents</h2>
|
399 |
<table>
|
400 |
<tr><th>Talent</th><th>Value</th></tr>
|
401 |
+
{''.join([f"<tr><td>{talent}</td><td>{value}</td></tr>" for talent, value in character_sheet["Talents"].items()])}
|
402 |
</table>
|
403 |
<h2>Skills</h2>
|
404 |
<table>
|
405 |
<tr><th>Skill</th><th>Value</th></tr>
|
406 |
+
{''.join([f"<tr><td>{skill}</td><td>{value}</td></tr>" for skill, value in character_sheet["Skills"].items()])}
|
407 |
</table>
|
408 |
<h2>Knowledges</h2>
|
409 |
<table>
|
410 |
<tr><th>Knowledge</th><th>Value</th></tr>
|
411 |
+
{''.join([f"<tr><td>{knowledge}</td><td>{value}</td></tr>" for knowledge, value in character_sheet["Knowledges"].items()])}
|
412 |
</table>
|
413 |
<h2>Spheres</h2>
|
414 |
<table>
|
415 |
<tr><th>Sphere</th><th>Value</th></tr>
|
416 |
+
{''.join([f"<tr><td>{sphere}</td><td>{value}</td></tr>" for sphere, value in character_sheet["Spheres"].items()])}
|
417 |
</table>
|
418 |
<h2>Advantages</h2>
|
419 |
<table>
|
420 |
<tr><th>Type</th><th>Value</th></tr>
|
421 |
+
{''.join([f"<tr><td>{advantage}</td><td>{value}</td></tr>" for advantage, value in character_sheet["Advantages"].items()])}
|
422 |
</table>
|
423 |
<h2>Health</h2>
|
424 |
<table>
|
425 |
+
<tr><th>Health Level</th><th>Value</th></tr>
|
426 |
+
{''.join([f"<tr><td>{health}</td><td>{value}</td></tr>" for health, value in character_sheet["Health"].items()])}
|
427 |
</table>
|
428 |
<h2>Backgrounds</h2>
|
429 |
<table>
|
430 |
+
<tr><th>Background</th><th>Value</th></tr>
|
431 |
+
{''.join([f"<tr><td>{background}</td><td>{value}</td></tr>" for background, value in character_sheet["Backgrounds"].items()])}
|
432 |
</table>
|
433 |
<h2>Other Traits</h2>
|
434 |
<p>Quirks: {character_sheet["Other Traits"]["Quirks"]}</p>
|
435 |
</body>
|
436 |
</html>
|
437 |
"""
|
438 |
+
return html
|
|
|
|
|
439 |
|
440 |
+
# Bot贸n para descargar el HTML
|
441 |
+
html = download_html(character_sheet)
|
442 |
+
b64 = base64.b64encode(html.encode()).decode()
|
443 |
+
href = f'<a href="data:text/html;base64,{b64}" download="character_sheet.html">Download Character Sheet</a>'
|
444 |
+
st.markdown(href, unsafe_allow_html=True)
|