Spaces:
Running
Running
Commit
·
d180081
1
Parent(s):
a84afa6
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ interface = gr.Interface(
|
|
56 |
],
|
57 |
outputs=[
|
58 |
gr.outputs.Textbox(label="Paraphrased text:"),
|
59 |
-
gr.outputs.
|
60 |
gr.outputs.HTML(label="Highlighted differences:")
|
61 |
],
|
62 |
title="Parrot Paraphrasing Tool",
|
@@ -70,7 +70,7 @@ def app(text, language, model, level, audio_output, file_upload):
|
|
70 |
paraphrased_text = paraphrase_text(text, languages[language], models[model], level)
|
71 |
if audio_output:
|
72 |
speak_paraphrased_text(paraphrased_text, languages[language])
|
73 |
-
|
74 |
highlighted_diffs = highlight_diffs(text, paraphrased_text, level)
|
75 |
return paraphrased_text, download_output, highlighted_diffs
|
76 |
|
|
|
56 |
],
|
57 |
outputs=[
|
58 |
gr.outputs.Textbox(label="Paraphrased text:"),
|
59 |
+
gr.outputs.File(label="Download paraphrased text as text file:", default="paraphrased_text.txt", file_ext=".txt"),
|
60 |
gr.outputs.HTML(label="Highlighted differences:")
|
61 |
],
|
62 |
title="Parrot Paraphrasing Tool",
|
|
|
70 |
paraphrased_text = paraphrase_text(text, languages[language], models[model], level)
|
71 |
if audio_output:
|
72 |
speak_paraphrased_text(paraphrased_text, languages[language])
|
73 |
+
download_output = gr.outputs.File(paraphrased_text, label="Download paraphrased text as text file:", type="file", file_name="paraphrased_text.txt")
|
74 |
highlighted_diffs = highlight_diffs(text, paraphrased_text, level)
|
75 |
return paraphrased_text, download_output, highlighted_diffs
|
76 |
|