Spaces:
Runtime error
Runtime error
Commit
•
85faa02
1
Parent(s):
7e3fa91
Update app.py
Browse files
app.py
CHANGED
@@ -68,8 +68,7 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=True):
|
|
68 |
payload
|
69 |
)
|
70 |
|
71 |
-
|
72 |
-
if True:
|
73 |
return None, data[0]['generated_text']
|
74 |
|
75 |
width, height = 3326, 3326
|
@@ -112,7 +111,7 @@ gr.Interface(
|
|
112 |
gr.inputs.Textbox(label="Input"),
|
113 |
gr.inputs.Radio([64], default=64, label="Tokens to generate"),
|
114 |
gr.inputs.Radio(["sampling"], label="Sample or greedy", default="sampling"),
|
115 |
-
gr.Checkbox(label="Just output raw text", value=
|
116 |
],
|
117 |
["image", "text"],
|
118 |
examples=examples,
|
|
|
68 |
payload
|
69 |
)
|
70 |
|
71 |
+
if raw_text:
|
|
|
72 |
return None, data[0]['generated_text']
|
73 |
|
74 |
width, height = 3326, 3326
|
|
|
111 |
gr.inputs.Textbox(label="Input"),
|
112 |
gr.inputs.Radio([64], default=64, label="Tokens to generate"),
|
113 |
gr.inputs.Radio(["sampling"], label="Sample or greedy", default="sampling"),
|
114 |
+
gr.Checkbox(label="Just output raw text", value=False),
|
115 |
],
|
116 |
["image", "text"],
|
117 |
examples=examples,
|