Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
~ app.py
Browse files
app.py
CHANGED
@@ -28,10 +28,12 @@ def translate(text, num_beams=4, num_return_sequences=4):
|
|
28 |
output = gr.outputs.Textbox()
|
29 |
# with gr.Accordion("Advanced Options"):
|
30 |
num_beams = gr.inputs.Slider(2, 10, step=1, label="Number of beams", default=4)
|
31 |
-
num_return_sequences = gr.inputs.Slider(2, 10, step=1, label="Number of returned
|
32 |
|
33 |
|
34 |
title = "Russian-Circassian translator demo"
|
|
|
|
|
35 |
|
36 |
examples = [
|
37 |
["Мы идем домой"],
|
@@ -52,7 +54,8 @@ gr.Interface(
|
|
52 |
inputs=["text", num_beams, num_return_sequences],
|
53 |
outputs=output,
|
54 |
title=title,
|
55 |
-
examples=examples,
|
|
|
56 |
|
57 |
# import gradio as gr
|
58 |
|
|
|
28 |
output = gr.outputs.Textbox()
|
29 |
# with gr.Accordion("Advanced Options"):
|
30 |
num_beams = gr.inputs.Slider(2, 10, step=1, label="Number of beams", default=4)
|
31 |
+
num_return_sequences = gr.inputs.Slider(2, 10, step=1, label="Number of returned sentences", default=4)
|
32 |
|
33 |
|
34 |
title = "Russian-Circassian translator demo"
|
35 |
+
# contact me on https://github.com/qunash/
|
36 |
+
article = "<p style='text-align: center'>Contact me on <a href='https://github.com/qunash/' target='_blank'>GitHub</a></p>"
|
37 |
|
38 |
examples = [
|
39 |
["Мы идем домой"],
|
|
|
54 |
inputs=["text", num_beams, num_return_sequences],
|
55 |
outputs=output,
|
56 |
title=title,
|
57 |
+
examples=examples,
|
58 |
+
article=article).launch()
|
59 |
|
60 |
# import gradio as gr
|
61 |
|