Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,7 +109,7 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=False, seed
|
|
| 109 |
data = query(payload)
|
| 110 |
|
| 111 |
if raw_text:
|
| 112 |
-
return None, data[
|
| 113 |
|
| 114 |
width, height = 3246, 3246
|
| 115 |
assets_path = "assets"
|
|
@@ -127,9 +127,9 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=False, seed
|
|
| 127 |
BOX_COMP: "#120F25",
|
| 128 |
}
|
| 129 |
|
| 130 |
-
new_string = data[
|
| 131 |
|
| 132 |
-
return data[
|
| 133 |
|
| 134 |
|
| 135 |
gr.Interface(
|
|
|
|
| 109 |
data = query(payload)
|
| 110 |
|
| 111 |
if raw_text:
|
| 112 |
+
return None, data["generated_text"]
|
| 113 |
|
| 114 |
width, height = 3246, 3246
|
| 115 |
assets_path = "assets"
|
|
|
|
| 127 |
BOX_COMP: "#120F25",
|
| 128 |
}
|
| 129 |
|
| 130 |
+
new_string = data["generated_text"].split(input_sentence, 1)[1]
|
| 131 |
|
| 132 |
+
return data["generated_text"]
|
| 133 |
|
| 134 |
|
| 135 |
gr.Interface(
|