Spaces:
Runtime error
Runtime error
app.py
CHANGED
@@ -60,7 +60,7 @@ def poem_generate(word):
|
|
60 |
{
|
61 |
"top_p": 0.9,
|
62 |
"temperature": 1.1,
|
63 |
-
"max_new_tokens":
|
64 |
"return_full_text": False
|
65 |
}}
|
66 |
response = requests.post(API_URL, headers=headers, json=json_)
|
@@ -79,8 +79,8 @@ def poem_generate(word):
|
|
79 |
else:
|
80 |
poem = output_tmp.split("\n\n")[0] # +"."
|
81 |
poem = poem.replace('?','')
|
82 |
-
print(f"Poem being returned is: {poem}")
|
83 |
-
return poem
|
84 |
|
85 |
def poem_to_image(poem):
|
86 |
print("*****Inside Poem_to_image")
|
|
|
60 |
{
|
61 |
"top_p": 0.9,
|
62 |
"temperature": 1.1,
|
63 |
+
"max_new_tokens": 500,
|
64 |
"return_full_text": False
|
65 |
}}
|
66 |
response = requests.post(API_URL, headers=headers, json=json_)
|
|
|
79 |
else:
|
80 |
poem = output_tmp.split("\n\n")[0] # +"."
|
81 |
poem = poem.replace('?','')
|
82 |
+
#print(f"Poem being returned is: {poem}")
|
83 |
+
return output_tmp #poem
|
84 |
|
85 |
def poem_to_image(poem):
|
86 |
print("*****Inside Poem_to_image")
|