Spaces:
Runtime error
Runtime error
Logan Zoellner
commited on
Commit
·
84519dc
1
Parent(s):
a72960c
that worked, but output format is wrong
Browse files
app.py
CHANGED
@@ -18,7 +18,9 @@ examples = [["river"], ["night"], ["trees"],["table"],["laughs"]]
|
|
18 |
|
19 |
def npc_generate(name,race,characterClass):
|
20 |
|
21 |
-
|
|
|
|
|
22 |
print(f"*****Inside poem_generate - Prompt is :{p}")
|
23 |
json_ = {"inputs": p,
|
24 |
"parameters":
|
@@ -46,7 +48,7 @@ def npc_generate(name,race,characterClass):
|
|
46 |
poem = output_tmp.split("\n\n")[0] # +"."
|
47 |
poem = poem.replace('?','')
|
48 |
print(f"Poem being returned is: {poem}")
|
49 |
-
return poem
|
50 |
|
51 |
def poem_to_image(poem):
|
52 |
print("*****Inside Poem_to_image")
|
|
|
18 |
|
19 |
def npc_generate(name,race,characterClass):
|
20 |
|
21 |
+
desc="{name} is a {race} {characterClass}".format(name=name,race=race,characterClass=characterClass)
|
22 |
+
|
23 |
+
p = prompt + "\n"+desc
|
24 |
print(f"*****Inside poem_generate - Prompt is :{p}")
|
25 |
json_ = {"inputs": p,
|
26 |
"parameters":
|
|
|
48 |
poem = output_tmp.split("\n\n")[0] # +"."
|
49 |
poem = poem.replace('?','')
|
50 |
print(f"Poem being returned is: {poem}")
|
51 |
+
return desc+poem
|
52 |
|
53 |
def poem_to_image(poem):
|
54 |
print("*****Inside Poem_to_image")
|