Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,7 +93,7 @@ CSS = """
|
|
| 93 |
"""
|
| 94 |
|
| 95 |
LICENSE = """
|
| 96 |
-
|
| 97 |
"""
|
| 98 |
|
| 99 |
LANG_LIST = ['Akrikaans', 'Amharic', 'Arabic', 'Armenian', 'Assamese', 'Asturian', 'Azerbaijani', \
|
|
@@ -160,7 +160,6 @@ with gr.Blocks(theme="soft", css=CSS) as demo:
|
|
| 160 |
label="Repetition penalty",
|
| 161 |
)
|
| 162 |
with gr.Accordion("Advanced Options", open=False):
|
| 163 |
-
gr.Markdown(LICENSE)
|
| 164 |
inst = gr.Textbox(
|
| 165 |
label="Instruction",
|
| 166 |
value="Translate the following sentences from {src_language} to {trg_language}.",
|
|
@@ -168,10 +167,8 @@ with gr.Blocks(theme="soft", css=CSS) as demo:
|
|
| 168 |
)
|
| 169 |
prompt = gr.Textbox(
|
| 170 |
label="Prompt",
|
| 171 |
-
value="""
|
| 172 |
-
'
|
| 173 |
-
'Write a response that appropriately completes the request.\n'
|
| 174 |
-
""",
|
| 175 |
lines=8,
|
| 176 |
)
|
| 177 |
|
|
@@ -190,7 +187,8 @@ with gr.Blocks(theme="soft", css=CSS) as demo:
|
|
| 190 |
with gr.Row():
|
| 191 |
submit = gr.Button(value="Submit")
|
| 192 |
clear = gr.ClearButton([source_text, output_text])
|
| 193 |
-
|
|
|
|
| 194 |
source_text.change(lang_detector, source_text, source_lang)
|
| 195 |
submit.click(fn=translate, inputs=[source_text, source_lang, target_lang, inst, prompt, max_length, temperature, top_p, rp], outputs=[output_text])
|
| 196 |
|
|
|
|
| 93 |
"""
|
| 94 |
|
| 95 |
LICENSE = """
|
| 96 |
+
Model: <a href="https://huggingface.co/LLaMAX/LLaMAX3-8B-Alpaca">LLaMAX3-8B-Alpaca</a>
|
| 97 |
"""
|
| 98 |
|
| 99 |
LANG_LIST = ['Akrikaans', 'Amharic', 'Arabic', 'Armenian', 'Assamese', 'Asturian', 'Azerbaijani', \
|
|
|
|
| 160 |
label="Repetition penalty",
|
| 161 |
)
|
| 162 |
with gr.Accordion("Advanced Options", open=False):
|
|
|
|
| 163 |
inst = gr.Textbox(
|
| 164 |
label="Instruction",
|
| 165 |
value="Translate the following sentences from {src_language} to {trg_language}.",
|
|
|
|
| 167 |
)
|
| 168 |
prompt = gr.Textbox(
|
| 169 |
label="Prompt",
|
| 170 |
+
value=""" 'Below is an instruction that describes a task, paired with an input that provides further context. '
|
| 171 |
+
'Write a response that appropriately completes the request.\n' """,
|
|
|
|
|
|
|
| 172 |
lines=8,
|
| 173 |
)
|
| 174 |
|
|
|
|
| 187 |
with gr.Row():
|
| 188 |
submit = gr.Button(value="Submit")
|
| 189 |
clear = gr.ClearButton([source_text, output_text])
|
| 190 |
+
gr.Markdown(LICENSE)
|
| 191 |
+
|
| 192 |
source_text.change(lang_detector, source_text, source_lang)
|
| 193 |
submit.click(fn=translate, inputs=[source_text, source_lang, target_lang, inst, prompt, max_length, temperature, top_p, rp], outputs=[output_text])
|
| 194 |
|