Spaces:
Build error
Build error
Tahsin-Mayeesha
commited on
Commit
•
29a372f
1
Parent(s):
25d0e85
Update
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def generate__questions(model_choice,context,answer):
|
|
28 |
num_return_sequences=1
|
29 |
)
|
30 |
|
31 |
-
return
|
32 |
|
33 |
demo = gr.Interface(fn=generate__questions, inputs=[gr.Dropdown(label="Model", choices=["mt5-small","mt5-base","banglat5"],value="banglat5"),
|
34 |
gr.Textbox(label='Context'),
|
|
|
28 |
num_return_sequences=1
|
29 |
)
|
30 |
|
31 |
+
return tokenizer.decode(generated_ids[0],skip_special_tokens=True,clean_up_tokenization_spaces=True).replace('question: ',' ')
|
32 |
|
33 |
demo = gr.Interface(fn=generate__questions, inputs=[gr.Dropdown(label="Model", choices=["mt5-small","mt5-base","banglat5"],value="banglat5"),
|
34 |
gr.Textbox(label='Context'),
|