Spaces:
Runtime error
Runtime error
Removing the image.
Browse files
app.py
CHANGED
@@ -128,20 +128,7 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=False, seed
|
|
128 |
|
129 |
new_string = data[0]["generated_text"].split(input_sentence, 1)[1]
|
130 |
|
131 |
-
|
132 |
-
input_sentence,
|
133 |
-
new_string,
|
134 |
-
width,
|
135 |
-
height,
|
136 |
-
# assets_path=assets_path,
|
137 |
-
font_path=font_path,
|
138 |
-
colors=colors,
|
139 |
-
frame_to_box_margin=200,
|
140 |
-
text_to_text_box_margin=50,
|
141 |
-
init_font_size=150,
|
142 |
-
right_align=False,
|
143 |
-
)
|
144 |
-
return img, data[0]["generated_text"]
|
145 |
|
146 |
|
147 |
gr.Interface(
|
@@ -160,7 +147,7 @@ gr.Interface(
|
|
160 |
type="index",
|
161 |
),
|
162 |
],
|
163 |
-
["
|
164 |
examples=examples,
|
165 |
# article=article,
|
166 |
cache_examples=False,
|
|
|
128 |
|
129 |
new_string = data[0]["generated_text"].split(input_sentence, 1)[1]
|
130 |
|
131 |
+
return data[0]["generated_text"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
|
134 |
gr.Interface(
|
|
|
147 |
type="index",
|
148 |
),
|
149 |
],
|
150 |
+
["text"],
|
151 |
examples=examples,
|
152 |
# article=article,
|
153 |
cache_examples=False,
|