Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -92,7 +92,13 @@ def biogpt_audio(
|
|
92 |
|
93 |
return en_prompt, output, output_text
|
94 |
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
app = gr.Blocks()
|
98 |
with app:
|
@@ -127,7 +133,7 @@ with app:
|
|
127 |
output_text = gr.Textbox(lines=3, label="BioGpt Text")
|
128 |
translated_text = gr.Textbox(lines=3,label="Translated Text")
|
129 |
|
130 |
-
gr.Examples(examples, inputs=[input_text, text_biogpt, text_m2m100,text_lang], outputs=[prompt_text, output_text, translated_text], fn=biogpt_text, cache_examples=
|
131 |
text_button.click(biogpt_text, inputs=[input_text, text_biogpt, text_m2m100 ,text_lang], outputs=[prompt_text, output_text, translated_text])
|
132 |
audio_button.click(biogpt_audio, inputs=[input_audio, audio_biogpt, audio_whisper, audio_lang, audio_m2m100], outputs=[prompt_text, output_text, translated_text])
|
133 |
|
|
|
92 |
|
93 |
return en_prompt, output, output_text
|
94 |
|
95 |
+
question_example = 'question: Should chest wall irradiation be included after mastectomy and negative node breast cancer? context: This study aims to evaluate local failure patterns in node negative breast cancer patients treated with post-mastectomy radiotherapy including internal mammary chain only. Retrospective analysis of 92 internal or central-breast node-negative tumours with mastectomy and external irradiation of the internal mammary chain at the dose of 50 Gy, from 1994 to 1998. Local recurrence rate was 5 % (five cases). Recurrence sites were the operative scare and chest wall. Factors associated with increased risk of local failure were age<or = 40 years and tumour size greater than 20mm, without statistical significance. answer: Post-mastectomy radiotherapy should be discussed for a sub-group of node-negative patients with predictors factors of local failure such as age<or = 40 years and larger tumour size. target: the answer to the question given the context is'
|
96 |
+
|
97 |
+
examples = [
|
98 |
+
["COVID-19 is", biogpt_model_list[0], lang_model_list[1], "English"],
|
99 |
+
[question_example, biogpt_model_list[2], lang_model_list[1], "English"]
|
100 |
+
]
|
101 |
+
|
102 |
|
103 |
app = gr.Blocks()
|
104 |
with app:
|
|
|
133 |
output_text = gr.Textbox(lines=3, label="BioGpt Text")
|
134 |
translated_text = gr.Textbox(lines=3,label="Translated Text")
|
135 |
|
136 |
+
gr.Examples(examples, inputs=[input_text, text_biogpt, text_m2m100,text_lang], outputs=[prompt_text, output_text, translated_text], fn=biogpt_text, cache_examples=True)
|
137 |
text_button.click(biogpt_text, inputs=[input_text, text_biogpt, text_m2m100 ,text_lang], outputs=[prompt_text, output_text, translated_text])
|
138 |
audio_button.click(biogpt_audio, inputs=[input_audio, audio_biogpt, audio_whisper, audio_lang, audio_m2m100], outputs=[prompt_text, output_text, translated_text])
|
139 |
|