Spaces:
Runtime error
Runtime error
Sanchit Gandhi
commited on
Commit
·
1933570
1
Parent(s):
f63429f
Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=True):
|
|
78 |
)
|
79 |
|
80 |
if raw_text:
|
81 |
-
return None, data['generated_text'][0]
|
82 |
|
83 |
width, height = 3326, 3326
|
84 |
assets_path = "assets"
|
@@ -97,7 +97,7 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=True):
|
|
97 |
}
|
98 |
|
99 |
# TODO: fix screenshot
|
100 |
-
new_string = data['generated_text'][0].split(input_sentence, 1)[1]
|
101 |
|
102 |
_, img = main(
|
103 |
input_sentence,
|
@@ -112,7 +112,7 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=True):
|
|
112 |
init_font_size=142,
|
113 |
right_align=False,
|
114 |
)
|
115 |
-
return img, data['generated_text'][0]
|
116 |
|
117 |
|
118 |
gr.Interface(
|
|
|
78 |
)
|
79 |
|
80 |
if raw_text:
|
81 |
+
return None, data[0]['generated_text'][0]
|
82 |
|
83 |
width, height = 3326, 3326
|
84 |
assets_path = "assets"
|
|
|
97 |
}
|
98 |
|
99 |
# TODO: fix screenshot
|
100 |
+
new_string = data[0]['generated_text'][0].split(input_sentence, 1)[1]
|
101 |
|
102 |
_, img = main(
|
103 |
input_sentence,
|
|
|
112 |
init_font_size=142,
|
113 |
right_align=False,
|
114 |
)
|
115 |
+
return img, data[0]['generated_text'][0]
|
116 |
|
117 |
|
118 |
gr.Interface(
|