Update app.py
Browse files
app.py
CHANGED
@@ -183,13 +183,13 @@ def generate_caption(protein, prompt):
|
|
183 |
res_str = ''
|
184 |
if len(union_pred_terms[0]) != 0:
|
185 |
temp = ['- '+i+'\n' for i in union_pred_terms[0]]
|
186 |
-
res_str += f"Based on the given amino acid sequence, the protein appears to have a primary function of \n{temp} \n"
|
187 |
if len(union_pred_terms[1]) != 0:
|
188 |
temp = ['- ' + i + '\n' for i in union_pred_terms[1]]
|
189 |
-
res_str += f"It is likely involved in the following process: \n{temp} \n"
|
190 |
if len(union_pred_terms[2]) != 0:
|
191 |
temp = ['- ' + i + '\n' for i in union_pred_terms[2]]
|
192 |
-
res_str += f"It's subcellular localization is within the: \n{temp}"
|
193 |
return res_str
|
194 |
|
195 |
|
@@ -229,7 +229,7 @@ with gr.Blocks(css=css) as demo:
|
|
229 |
submit_btn = gr.Button(value="Submit")
|
230 |
with gr.Column():
|
231 |
# output_text = gr.Textbox(label="Output Text")
|
232 |
-
with gr.Accordion('
|
233 |
output_markdown = gr.Markdown(label="Output")
|
234 |
# O14813 train index 127, 266, 738, 1060 test index 4
|
235 |
gr.Examples(
|
|
|
183 |
res_str = ''
|
184 |
if len(union_pred_terms[0]) != 0:
|
185 |
temp = ['- '+i+'\n' for i in union_pred_terms[0]]
|
186 |
+
res_str += f"Based on the given amino acid sequence, the protein appears to have a primary function of \n{''.join(temp)} \n"
|
187 |
if len(union_pred_terms[1]) != 0:
|
188 |
temp = ['- ' + i + '\n' for i in union_pred_terms[1]]
|
189 |
+
res_str += f"It is likely involved in the following process: \n{''.join(temp)} \n"
|
190 |
if len(union_pred_terms[2]) != 0:
|
191 |
temp = ['- ' + i + '\n' for i in union_pred_terms[2]]
|
192 |
+
res_str += f"It's subcellular localization is within the: \n{''.join(temp)}"
|
193 |
return res_str
|
194 |
|
195 |
|
|
|
229 |
submit_btn = gr.Button(value="Submit")
|
230 |
with gr.Column():
|
231 |
# output_text = gr.Textbox(label="Output Text")
|
232 |
+
with gr.Accordion('Prediction:', open=True):
|
233 |
output_markdown = gr.Markdown(label="Output")
|
234 |
# O14813 train index 127, 266, 738, 1060 test index 4
|
235 |
gr.Examples(
|