Spaces:
Runtime error
Runtime error
upd
Browse files
app.py
CHANGED
@@ -58,8 +58,14 @@ def write_on_image(final_solution):
|
|
58 |
|
59 |
prompt_list = final_solution.split('\n')
|
60 |
girlfriend = prompt_list[8].split(':')[1].strip()
|
|
|
|
|
|
|
61 |
print(f"girlfriend is : {girlfriend }")
|
62 |
new_girl = prompt_list[9].split(':')[1].strip()
|
|
|
|
|
|
|
63 |
print(f"new_girl is : {new_girl}")
|
64 |
prompt_list.pop(0)
|
65 |
prompt_list.pop(0)
|
@@ -140,7 +146,7 @@ with demo:
|
|
140 |
#with gr.Row():
|
141 |
output_image = gr.Image() #type="filepath", shape=(256,256))
|
142 |
with gr.Row():
|
143 |
-
in_slider_temp = gr.Slider(minimum=0.0, maximum=
|
144 |
in_slider_top_p = gr.Slider(minimum=0.50, maximum=0.99, value=0.90, step=0.01, label='Top_p')
|
145 |
|
146 |
#output_prompt = gr.Textbox(label="Text generated", lines=5)
|
|
|
58 |
|
59 |
prompt_list = final_solution.split('\n')
|
60 |
girlfriend = prompt_list[8].split(':')[1].strip()
|
61 |
+
girlfriend_list = girlfriend.split()
|
62 |
+
if len(girlfriend_list) >= 2:
|
63 |
+
girlfriend = '\n'.join(girlfriend_list)
|
64 |
print(f"girlfriend is : {girlfriend }")
|
65 |
new_girl = prompt_list[9].split(':')[1].strip()
|
66 |
+
new_girl_list = new_girl.split()
|
67 |
+
if len(new_girl_list) > 2:
|
68 |
+
new_girl = '\n'.join(new_girl_list)
|
69 |
print(f"new_girl is : {new_girl}")
|
70 |
prompt_list.pop(0)
|
71 |
prompt_list.pop(0)
|
|
|
146 |
#with gr.Row():
|
147 |
output_image = gr.Image() #type="filepath", shape=(256,256))
|
148 |
with gr.Row():
|
149 |
+
in_slider_temp = gr.Slider(minimum=0.0, maximum=1.4, value=1.1, step=0.1, label='Temperature')
|
150 |
in_slider_top_p = gr.Slider(minimum=0.50, maximum=0.99, value=0.90, step=0.01, label='Top_p')
|
151 |
|
152 |
#output_prompt = gr.Textbox(label="Text generated", lines=5)
|