Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -909,10 +909,21 @@ def update_protein_display(chat_response):
|
|
909 |
}
|
910 |
return None
|
911 |
|
912 |
-
|
913 |
-
|
914 |
def process_chat_and_generate(message, history):
|
915 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
916 |
# 1. ํ๋กฌํํธ ๋ถ์ ๋ฐ ํ๋ผ๋ฏธํฐ ์ค์
|
917 |
analysis = analyze_prompt(message)
|
918 |
similar_structures = search_protein_data(analysis, ds)
|
@@ -978,32 +989,43 @@ def process_chat_and_generate(message, history):
|
|
978 |
|
979 |
output_seq, output_pdb, structure_view, plddt_plot = final_result
|
980 |
|
981 |
-
|
982 |
-
explanation = f"""
|
983 |
-
์์ฒญํ์ ๊ธฐ๋ฅ์ ๋ง๋ ๋จ๋ฐฑ์ง์ ์์ฑํ์ต๋๋ค:
|
984 |
|
985 |
-
|
|
|
|
|
|
|
|
|
|
|
986 |
{analysis}
|
987 |
-
|
988 |
-
|
989 |
- ๊ธธ์ด: {params['sequence_length']} ์๋ฏธ๋
ธ์ฐ
|
990 |
- ์ํ ํฌ๋ฆญ์ค ๋น์จ: {params['helix_bias']*100:.1f}%
|
991 |
- ๋ฒ ํ ์ํธ ๋น์จ: {params['strand_bias']*100:.1f}%
|
992 |
- ๋ฃจํ ๊ตฌ์กฐ ๋น์จ: {params['loop_bias']*100:.1f}%
|
993 |
- ์์์ฑ ์ ์: {params['hydrophobic_target_score']}
|
994 |
-
|
995 |
-
|
996 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
997 |
"""
|
998 |
|
999 |
-
# 6. ์ต์ข
๊ฒฐ๊ณผ ๋ฐํ
|
1000 |
return (
|
1001 |
history + [
|
1002 |
{"role": "user", "content": message},
|
1003 |
-
{"role": "assistant", "content":
|
1004 |
],
|
1005 |
create_radar_chart(stats),
|
1006 |
-
|
1007 |
output_seq,
|
1008 |
output_pdb,
|
1009 |
structure_view,
|
@@ -1012,7 +1034,7 @@ def process_chat_and_generate(message, history):
|
|
1012 |
|
1013 |
except Exception as e:
|
1014 |
print(f"Error in process_chat_and_generate: {str(e)}")
|
1015 |
-
traceback.print_exc()
|
1016 |
return (
|
1017 |
history + [
|
1018 |
{"role": "user", "content": message},
|
@@ -1021,6 +1043,8 @@ def process_chat_and_generate(message, history):
|
|
1021 |
None, None, None, None, None, None
|
1022 |
)
|
1023 |
|
|
|
|
|
1024 |
def extract_keywords(analysis):
|
1025 |
"""๋ถ์ ํ
์คํธ์์ ํค์๋ ์ถ์ถ"""
|
1026 |
try:
|
@@ -1145,8 +1169,8 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1145 |
)
|
1146 |
max_tokens = gr.Slider(
|
1147 |
minimum=1,
|
1148 |
-
maximum=
|
1149 |
-
value=
|
1150 |
step=1,
|
1151 |
label="์ต๋ ํ ํฐ ์"
|
1152 |
)
|
@@ -1168,21 +1192,21 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1168 |
|
1169 |
# ํญ ์ธํฐํ์ด์ค
|
1170 |
with gr.Tabs():
|
1171 |
-
with gr.TabItem("๐ฆธโโ๏ธ
|
1172 |
gr.Markdown("""
|
1173 |
-
### โจ ๋น์ ๋ง์ ํน๋ณํ
|
1174 |
-
๊ฐ ๋ฅ๋ ฅ์น๋ฅผ ์กฐ์ ํ๋ฉด
|
1175 |
""")
|
1176 |
|
1177 |
# ํ์ด๋ก ๊ธฐ๋ณธ ์ ๋ณด
|
1178 |
hero_name = gr.Textbox(
|
1179 |
-
label="
|
1180 |
-
placeholder="๋น์ ์
|
1181 |
-
info="
|
1182 |
)
|
1183 |
|
1184 |
# ๋ฅ๋ ฅ์น ์ค์
|
1185 |
-
gr.Markdown("### ๐ช
|
1186 |
with gr.Row():
|
1187 |
strength = gr.Slider(
|
1188 |
minimum=0.0, maximum=0.05,
|
@@ -1214,15 +1238,15 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1214 |
# ํ์ด๋ก ํฌ๊ธฐ ์ค์
|
1215 |
hero_size = gr.Slider(
|
1216 |
minimum=50, maximum=200,
|
1217 |
-
label="๐
|
1218 |
value=100,
|
1219 |
-
info="
|
1220 |
)
|
1221 |
|
1222 |
# ํน์ ๋ฅ๋ ฅ ์ค์
|
1223 |
with gr.Accordion("๐ ํน์ ๋ฅ๋ ฅ", open=False):
|
1224 |
gr.Markdown("""
|
1225 |
-
ํน์ ๋ฅ๋ ฅ์ ์ ํํ๋ฉด
|
1226 |
- ์๊ฐ ํ๋ณต: ๋จ๋ฐฑ์ง ๊ตฌ์กฐ ๋ณต๊ตฌ ๋ฅ๋ ฅ ๊ฐํ
|
1227 |
- ์๊ฑฐ๋ฆฌ ๊ณต๊ฒฉ: ํน์ํ ๊ตฌ์กฐ์ ๋์ถ๋ถ ํ์ฑ
|
1228 |
- ๋ฐฉ์ด๋ง ์์ฑ: ์์ ์ ์ธ ๋ณดํธ์ธต ๊ตฌ์กฐ ์์ฑ
|
@@ -1233,12 +1257,12 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1233 |
)
|
1234 |
|
1235 |
# ์์ฑ ๋ฒํผ
|
1236 |
-
create_btn = gr.Button("๐งฌ
|
1237 |
|
1238 |
-
with gr.TabItem("๐งฌ
|
1239 |
gr.Markdown("""
|
1240 |
-
### ๐งช
|
1241 |
-
|
1242 |
""")
|
1243 |
|
1244 |
seq_opt = gr.Radio(
|
@@ -1248,7 +1272,7 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1248 |
)
|
1249 |
|
1250 |
sequence = gr.Textbox(
|
1251 |
-
label="
|
1252 |
lines=1,
|
1253 |
placeholder='์ฌ์ฉ ๊ฐ๋ฅํ ์๋ฏธ๋
ธ์ฐ: A,C,D,E,F,G,H,I,K,L,M,N,P,Q,R,S,T,V,W,Y (X๋ ๋ฌด์์)',
|
1254 |
visible=False
|
@@ -1262,7 +1286,7 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1262 |
|
1263 |
with gr.Accordion(label='๐ฆด ๊ณจ๊ฒฉ ๊ตฌ์กฐ ์ค์ ', open=True):
|
1264 |
gr.Markdown("""
|
1265 |
-
|
1266 |
- ๋์ ํ ๊ตฌ์กฐ: ์ ์ฐํ๊ณ ํ๋ ฅ์๋ ์์ง์
|
1267 |
- ๋ณํํ ๊ตฌ์กฐ: ๋จ๋จํ๊ณ ๊ฐ๋ ฅํ ํ
|
1268 |
- ๊ณ ๋ฆฌํ ๊ตฌ์กฐ: ๋น ๋ฅด๊ณ ๋ฏผ์ฒฉํ ์์ง์
|
@@ -1297,9 +1321,9 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1297 |
visible=True
|
1298 |
)
|
1299 |
|
1300 |
-
with gr.Accordion(label='๐งฌ
|
1301 |
gr.Markdown("""
|
1302 |
-
ํน์ ์๋ฏธ๋
ธ์ฐ์ ๋น์จ์ ์กฐ์ ํ์ฌ
|
1303 |
์์: W0.2,E0.1 (ํธ๋ฆฝํ ํ 20%, ๊ธ๋ฃจํ์ฐ 10%)
|
1304 |
""")
|
1305 |
with gr.Row():
|
@@ -1316,7 +1340,7 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1316 |
|
1317 |
with gr.Accordion(label='๐ ํ๊ฒฝ ์ ์๋ ฅ ์ค์ ', open=False):
|
1318 |
gr.Markdown("""
|
1319 |
-
|
1320 |
์์: ์์ค ํ๋์ ํนํ, ์์: ์ง์ ํ๋์ ํนํ
|
1321 |
""")
|
1322 |
with gr.Row():
|
@@ -1347,24 +1371,24 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1347 |
value='normal'
|
1348 |
)
|
1349 |
|
1350 |
-
design_btn = gr.Button("๐งฌ
|
1351 |
|
1352 |
-
with gr.TabItem("๐งช
|
1353 |
gr.Markdown("""
|
1354 |
-
### โก ๊ธฐ์กด
|
1355 |
-
|
1356 |
""")
|
1357 |
|
1358 |
-
gr.Markdown("๊ณต๊ฐ๋
|
1359 |
pdb_id_code = gr.Textbox(
|
1360 |
-
label="
|
1361 |
lines=1,
|
1362 |
-
placeholder='๊ธฐ์กด
|
1363 |
)
|
1364 |
|
1365 |
-
gr.Markdown("์ด์ํ๊ณ ์ถ์
|
1366 |
contigs = gr.Textbox(
|
1367 |
-
label="์ด์ํ
|
1368 |
lines=1,
|
1369 |
placeholder='์์: 15,A3-10,20-30'
|
1370 |
)
|
@@ -1382,19 +1406,19 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1382 |
)
|
1383 |
|
1384 |
preview_viewer = gr.HTML()
|
1385 |
-
rewrite_pdb = gr.File(label='
|
1386 |
preview_btn = gr.Button("๐ ๋ฏธ๋ฆฌ๋ณด๊ธฐ", variant="secondary")
|
1387 |
-
enhance_btn = gr.Button("โก ๊ฐํ๋
|
1388 |
|
1389 |
-
with gr.TabItem("๐
|
1390 |
gr.Markdown("""
|
1391 |
-
### ๐ฐ ์๋ํ
|
1392 |
-
๊ฐ๋ ฅํ
|
1393 |
""")
|
1394 |
|
1395 |
with gr.Row():
|
1396 |
with gr.Column():
|
1397 |
-
gr.Markdown("
|
1398 |
fasta_msa = gr.File(label='๊ฐ๋ฌธ DNA ๋ฐ์ดํฐ')
|
1399 |
with gr.Column():
|
1400 |
gr.Markdown("์ด๋ฏธ ๋ถ์๋ ๊ฐ๋ฌธ ํน์ฑ ๋ฐ์ดํฐ๊ฐ ์๋ค๋ฉด ์
๋ก๋ํ์ธ์")
|
@@ -1407,18 +1431,18 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1407 |
|
1408 |
# ์ค๋ฅธ์ชฝ ์ด: ๊ฒฐ๊ณผ ํ์
|
1409 |
with gr.Column(scale=1):
|
1410 |
-
gr.Markdown("## ๐ฆธโโ๏ธ
|
1411 |
hero_stats = gr.Plot(label="๋ฅ๋ ฅ์น ๋ถ์")
|
1412 |
-
hero_description = gr.Textbox(label="
|
1413 |
|
1414 |
-
gr.Markdown("## ๐งฌ
|
1415 |
-
gr.Markdown("#### โก
|
1416 |
plddt_plot = gr.Plot(label='์์ ์ฑ ๋ถ์')
|
1417 |
-
gr.Markdown("#### ๐
|
1418 |
-
output_seq = gr.Textbox(label="
|
1419 |
-
gr.Markdown("#### ๐พ
|
1420 |
-
output_pdb = gr.File(label="
|
1421 |
-
gr.Markdown("#### ๐ฌ
|
1422 |
output_viewer = gr.HTML()
|
1423 |
|
1424 |
# ์ด๋ฒคํธ ์ฐ๊ฒฐ
|
|
|
909 |
}
|
910 |
return None
|
911 |
|
|
|
|
|
912 |
def process_chat_and_generate(message, history):
|
913 |
try:
|
914 |
+
# ์ด๊ธฐ ์๋ต ์์ฑ
|
915 |
+
initial_response = "๋จ๋ฐฑ์ง ์ค๊ณ๋ฅผ ์์ํฉ๋๋ค. ์ ์๋ง ๊ธฐ๋ค๋ ค์ฃผ์ธ์..."
|
916 |
+
|
917 |
+
# ์ด๊ธฐ ์๋ต ํ์
|
918 |
+
yield (
|
919 |
+
history + [
|
920 |
+
{"role": "user", "content": message},
|
921 |
+
{"role": "assistant", "content": initial_response}
|
922 |
+
],
|
923 |
+
None, None, None, None, None, None
|
924 |
+
)
|
925 |
+
|
926 |
+
|
927 |
# 1. ํ๋กฌํํธ ๋ถ์ ๋ฐ ํ๋ผ๋ฏธํฐ ์ค์
|
928 |
analysis = analyze_prompt(message)
|
929 |
similar_structures = search_protein_data(analysis, ds)
|
|
|
989 |
|
990 |
output_seq, output_pdb, structure_view, plddt_plot = final_result
|
991 |
|
992 |
+
|
|
|
|
|
993 |
|
994 |
+
|
995 |
+
# ์์ฑ ์๋ฃ ํ ์์ธ ์ค๋ช
์ถ๊ฐ
|
996 |
+
final_explanation = f"""
|
997 |
+
๋จ๋ฐฑ์ง ์ค๊ณ๊ฐ ์๋ฃ๋์์ต๋๋ค.
|
998 |
+
|
999 |
+
[๋ถ์ ๊ฒฐ๊ณผ]
|
1000 |
{analysis}
|
1001 |
+
|
1002 |
+
[๊ตฌ์กฐ์ ํน์ง]
|
1003 |
- ๊ธธ์ด: {params['sequence_length']} ์๋ฏธ๋
ธ์ฐ
|
1004 |
- ์ํ ํฌ๋ฆญ์ค ๋น์จ: {params['helix_bias']*100:.1f}%
|
1005 |
- ๋ฒ ํ ์ํธ ๋น์จ: {params['strand_bias']*100:.1f}%
|
1006 |
- ๋ฃจํ ๊ตฌ์กฐ ๋น์จ: {params['loop_bias']*100:.1f}%
|
1007 |
- ์์์ฑ ์ ์: {params['hydrophobic_target_score']}
|
1008 |
+
|
1009 |
+
[์์ฑ ๊ณผ์ ]
|
1010 |
+
- ์ด {len(plddt_data)}๋จ๊ณ์ ์ต์ ํ ์ํ
|
1011 |
+
- ์ต์ข
์์ ์ฑ ์ ์: {np.mean(plddt_data) if plddt_data else 0:.2f}
|
1012 |
+
- ์ฐธ์กฐ๋ ์ ์ฌ ๊ตฌ์กฐ: {len(similar_structures)}๊ฐ
|
1013 |
+
|
1014 |
+
[๊ธฐ๋ฅ์ ํน์ฑ]
|
1015 |
+
- ์ฃผ์ ํ์ฑ ๋ถ์: {analyze_active_sites(output_seq)}
|
1016 |
+
- ์์๋๋ ์ํธ์์ฉ: {predict_interactions(params)}
|
1017 |
+
- ์์ ์ฑ ํ๊ฐ: {evaluate_stability(plddt_data)}
|
1018 |
+
|
1019 |
+
3D ๊ตฌ์กฐ์ ์์ธ ๋ถ์ ๊ฒฐ๊ณผ๋ฅผ ํ์ธํ์ค ์ ์์ต๋๋ค.
|
1020 |
"""
|
1021 |
|
|
|
1022 |
return (
|
1023 |
history + [
|
1024 |
{"role": "user", "content": message},
|
1025 |
+
{"role": "assistant", "content": final_explanation}
|
1026 |
],
|
1027 |
create_radar_chart(stats),
|
1028 |
+
final_explanation,
|
1029 |
output_seq,
|
1030 |
output_pdb,
|
1031 |
structure_view,
|
|
|
1034 |
|
1035 |
except Exception as e:
|
1036 |
print(f"Error in process_chat_and_generate: {str(e)}")
|
1037 |
+
traceback.print_exc()
|
1038 |
return (
|
1039 |
history + [
|
1040 |
{"role": "user", "content": message},
|
|
|
1043 |
None, None, None, None, None, None
|
1044 |
)
|
1045 |
|
1046 |
+
|
1047 |
+
|
1048 |
def extract_keywords(analysis):
|
1049 |
"""๋ถ์ ํ
์คํธ์์ ํค์๋ ์ถ์ถ"""
|
1050 |
try:
|
|
|
1169 |
)
|
1170 |
max_tokens = gr.Slider(
|
1171 |
minimum=1,
|
1172 |
+
maximum=3800,
|
1173 |
+
value=3800,
|
1174 |
step=1,
|
1175 |
label="์ต๋ ํ ํฐ ์"
|
1176 |
)
|
|
|
1192 |
|
1193 |
# ํญ ์ธํฐํ์ด์ค
|
1194 |
with gr.Tabs():
|
1195 |
+
with gr.TabItem("๐ฆธโโ๏ธ ์ปค์คํ
๋์์ธ"):
|
1196 |
gr.Markdown("""
|
1197 |
+
### โจ ๋น์ ๋ง์ ํน๋ณํ ์ปค์คํ
์ ๋ง๋ค์ด๋ณด์ธ์!
|
1198 |
+
๊ฐ ๋ฅ๋ ฅ์น๋ฅผ ์กฐ์ ํ๋ฉด ์ปค์คํ
๋ ๋จ๋ฐฑ์ง์ด ์๋์ผ๋ก ์ค๊ณ๋ฉ๋๋ค.
|
1199 |
""")
|
1200 |
|
1201 |
# ํ์ด๋ก ๊ธฐ๋ณธ ์ ๋ณด
|
1202 |
hero_name = gr.Textbox(
|
1203 |
+
label="์ปค์คํ
์ด๋ฆ",
|
1204 |
+
placeholder="๋น์ ์ ์ปค์คํ
๋จ๋ฐฑ์ง ์ด๋ฆ์ ์ง์ด๏ฟฝ๏ฟฝ์ธ์!",
|
1205 |
+
info="๋น์ ๋ง์ ์ ์ฒด์ฑ์ ๋ํ๋ด๋ ์ด๋ฆ์ ์
๋ ฅํ์ธ์"
|
1206 |
)
|
1207 |
|
1208 |
# ๋ฅ๋ ฅ์น ์ค์
|
1209 |
+
gr.Markdown("### ๐ช ์ปค์คํ
๋ฅ๋ ฅ์น ์ค์ ")
|
1210 |
with gr.Row():
|
1211 |
strength = gr.Slider(
|
1212 |
minimum=0.0, maximum=0.05,
|
|
|
1238 |
# ํ์ด๋ก ํฌ๊ธฐ ์ค์
|
1239 |
hero_size = gr.Slider(
|
1240 |
minimum=50, maximum=200,
|
1241 |
+
label="๐ ์ปค์คํ
๋จ๋ฐฑ์ง ํฌ๊ธฐ",
|
1242 |
value=100,
|
1243 |
+
info="์ ์ฒด์ ์ธ ํฌ๊ธฐ๋ฅผ ๊ฒฐ์ ํฉ๋๋ค"
|
1244 |
)
|
1245 |
|
1246 |
# ํน์ ๋ฅ๋ ฅ ์ค์
|
1247 |
with gr.Accordion("๐ ํน์ ๋ฅ๋ ฅ", open=False):
|
1248 |
gr.Markdown("""
|
1249 |
+
ํน์ ๋ฅ๋ ฅ์ ์ ํํ๋ฉด ์ปค์คํ
๋จ๋ฐฑ์ง์ง์ ํน๋ณํ ๊ตฌ์กฐ๊ฐ ์ถ๊ฐ๋ฉ๋๋ค.
|
1250 |
- ์๊ฐ ํ๋ณต: ๋จ๋ฐฑ์ง ๊ตฌ์กฐ ๋ณต๊ตฌ ๋ฅ๋ ฅ ๊ฐํ
|
1251 |
- ์๊ฑฐ๋ฆฌ ๊ณต๊ฒฉ: ํน์ํ ๊ตฌ์กฐ์ ๋์ถ๋ถ ํ์ฑ
|
1252 |
- ๋ฐฉ์ด๋ง ์์ฑ: ์์ ์ ์ธ ๋ณดํธ์ธต ๊ตฌ์กฐ ์์ฑ
|
|
|
1257 |
)
|
1258 |
|
1259 |
# ์์ฑ ๋ฒํผ
|
1260 |
+
create_btn = gr.Button("๐งฌ ์ปค์คํ
๋จ๋ฐฑ์ง ์์ฑ!", variant="primary", scale=2)
|
1261 |
|
1262 |
+
with gr.TabItem("๐งฌ ์ปค์คํ
๋จ๋ฐฑ์ง ์ค๊ณ"):
|
1263 |
gr.Markdown("""
|
1264 |
+
### ๐งช ์ปค์คํ
๋จ๋ฐฑ์ง ๊ณ ๊ธ ์ค์
|
1265 |
+
์ ์ ์ ๊ตฌ์กฐ๋ฅผ ๋ ์ธ๋ฐํ๊ฒ ์กฐ์ ํ ์ ์์ต๋๋ค.
|
1266 |
""")
|
1267 |
|
1268 |
seq_opt = gr.Radio(
|
|
|
1272 |
)
|
1273 |
|
1274 |
sequence = gr.Textbox(
|
1275 |
+
label="๋จ๋ฐฑ์ง ์ํ์ค",
|
1276 |
lines=1,
|
1277 |
placeholder='์ฌ์ฉ ๊ฐ๋ฅํ ์๋ฏธ๋
ธ์ฐ: A,C,D,E,F,G,H,I,K,L,M,N,P,Q,R,S,T,V,W,Y (X๋ ๋ฌด์์)',
|
1278 |
visible=False
|
|
|
1286 |
|
1287 |
with gr.Accordion(label='๐ฆด ๊ณจ๊ฒฉ ๊ตฌ์กฐ ์ค์ ', open=True):
|
1288 |
gr.Markdown("""
|
1289 |
+
์ปค์คํ
๋จ๋ฐฑ์ง ๊ธฐ๋ณธ ๊ณจ๊ฒฉ ๊ตฌ์กฐ๋ฅผ ์ค์ ํฉ๋๋ค.
|
1290 |
- ๋์ ํ ๊ตฌ์กฐ: ์ ์ฐํ๊ณ ํ๋ ฅ์๋ ์์ง์
|
1291 |
- ๋ณํํ ๊ตฌ์กฐ: ๋จ๋จํ๊ณ ๊ฐ๋ ฅํ ํ
|
1292 |
- ๊ณ ๋ฆฌํ ๊ตฌ์กฐ: ๋น ๋ฅด๊ณ ๋ฏผ์ฒฉํ ์์ง์
|
|
|
1321 |
visible=True
|
1322 |
)
|
1323 |
|
1324 |
+
with gr.Accordion(label='๐งฌ ๋จ๋ฐฑ์ง ๊ตฌ์ฑ ์ค์ ', open=False):
|
1325 |
gr.Markdown("""
|
1326 |
+
ํน์ ์๋ฏธ๋
ธ์ฐ์ ๋น์จ์ ์กฐ์ ํ์ฌ ํน์ฑ์ ๊ฐํํ ์ ์์ต๋๋ค.
|
1327 |
์์: W0.2,E0.1 (ํธ๋ฆฝํ ํ 20%, ๊ธ๋ฃจํ์ฐ 10%)
|
1328 |
""")
|
1329 |
with gr.Row():
|
|
|
1340 |
|
1341 |
with gr.Accordion(label='๐ ํ๊ฒฝ ์ ์๋ ฅ ์ค์ ', open=False):
|
1342 |
gr.Markdown("""
|
1343 |
+
ํ๊ฒฝ ์ ์๋ ฅ์ ์กฐ์ ํฉ๋๋ค.
|
1344 |
์์: ์์ค ํ๋์ ํนํ, ์์: ์ง์ ํ๋์ ํนํ
|
1345 |
""")
|
1346 |
with gr.Row():
|
|
|
1371 |
value='normal'
|
1372 |
)
|
1373 |
|
1374 |
+
design_btn = gr.Button("๐งฌ ๋จ๋ฐฑ์ง ์ค๊ณ ์์ฑ!", variant="primary", scale=2)
|
1375 |
|
1376 |
+
with gr.TabItem("๐งช ์ปค์คํ
๋จ๋ฐฑ์ง ๊ฐํ"):
|
1377 |
gr.Markdown("""
|
1378 |
+
### โก ๊ธฐ์กด ์ปค์คํ
๋จ๋ฐฑ์ง ํ์ฉ
|
1379 |
+
๊ธฐ์กด ๋จ๋ฐฑ์ง ์ผ๋ถ๋ฅผ ์๋ก์ด ์ปค์คํ
์๊ฒ ์ด์ํฉ๋๋ค.
|
1380 |
""")
|
1381 |
|
1382 |
+
gr.Markdown("๊ณต๊ฐ๋ ์ปค์คํ
๋จ๋ฐฑ์ง ๋ฐ์ดํฐ๋ฒ ์ด์ค์์ ์ฝ๋๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค")
|
1383 |
pdb_id_code = gr.Textbox(
|
1384 |
+
label="์ปค์คํ
๋จ๋ฐฑ์ง ์ฝ๋",
|
1385 |
lines=1,
|
1386 |
+
placeholder='๊ธฐ์กด ์ปค์คํ
๋จ๋ฐฑ์ง ์ฝ๋๋ฅผ ์
๋ ฅํ์ธ์ (์: 1DPX)'
|
1387 |
)
|
1388 |
|
1389 |
+
gr.Markdown("์ด์ํ๊ณ ์ถ์ ๋จ๋ฐฑ์ง ์์ญ์ ์ ํํ๊ณ ์๋ก์ด ๋จ๋ฐฑ์ง์ ์ถ๊ฐํ ์ ์์ต๋๋ค")
|
1390 |
contigs = gr.Textbox(
|
1391 |
+
label="์ด์ํ ๋จ๋ฐฑ์ง ์์ญ",
|
1392 |
lines=1,
|
1393 |
placeholder='์์: 15,A3-10,20-30'
|
1394 |
)
|
|
|
1406 |
)
|
1407 |
|
1408 |
preview_viewer = gr.HTML()
|
1409 |
+
rewrite_pdb = gr.File(label='์ปค์คํ
๋จ๋ฐฑ์ง ํ์ผ')
|
1410 |
preview_btn = gr.Button("๐ ๋ฏธ๋ฆฌ๋ณด๊ธฐ", variant="secondary")
|
1411 |
+
enhance_btn = gr.Button("โก ๊ฐํ๋ ์ปค์คํ
๋จ๋ฐฑ์ง ์์ฑ!", variant="primary", scale=2)
|
1412 |
|
1413 |
+
with gr.TabItem("๐ ์ปค์คํ
๋จ๋ฐฑ์ง ์กฑ๋ณด"):
|
1414 |
gr.Markdown("""
|
1415 |
+
### ๐ฐ ์๋ํ ์ปค์คํ
๋จ๋ฐฑ์ง ๊ฐ๋ฌธ์ ์ ์ฐ
|
1416 |
+
๊ฐ๋ ฅํ ํน์ฑ์ ๊ณ์นํ์ฌ ์๋ก์ด ์ปค์คํ
๋จ๋ฐฑ์ง์ ๋ง๋ญ๋๋ค.
|
1417 |
""")
|
1418 |
|
1419 |
with gr.Row():
|
1420 |
with gr.Column():
|
1421 |
+
gr.Markdown("์ปค์คํ
๋จ๋ฐฑ์ง ์ ๋ณด๊ฐ ๋ด๊ธด ํ์ผ์ ์
๋ก๋ํ์ธ์")
|
1422 |
fasta_msa = gr.File(label='๊ฐ๋ฌธ DNA ๋ฐ์ดํฐ')
|
1423 |
with gr.Column():
|
1424 |
gr.Markdown("์ด๋ฏธ ๋ถ์๋ ๊ฐ๋ฌธ ํน์ฑ ๋ฐ์ดํฐ๊ฐ ์๋ค๋ฉด ์
๋ก๋ํ์ธ์")
|
|
|
1431 |
|
1432 |
# ์ค๋ฅธ์ชฝ ์ด: ๊ฒฐ๊ณผ ํ์
|
1433 |
with gr.Column(scale=1):
|
1434 |
+
gr.Markdown("## ๐ฆธโโ๏ธ ์ปค์คํ
๋จ๋ฐฑ์ง ํ๋กํ")
|
1435 |
hero_stats = gr.Plot(label="๋ฅ๋ ฅ์น ๋ถ์")
|
1436 |
+
hero_description = gr.Textbox(label="์ปค์คํ
๋จ๋ฐฑ์ง ํน์ฑ", lines=3)
|
1437 |
|
1438 |
+
gr.Markdown("## ๐งฌ ์ปค์คํ
๋จ๋ฐฑ์ง ๋ถ์ ๊ฒฐ๊ณผ")
|
1439 |
+
gr.Markdown("#### โก ์ปค์คํ
๋จ๋ฐฑ์ง ์์ ์ฑ ์ ์")
|
1440 |
plddt_plot = gr.Plot(label='์์ ์ฑ ๋ถ์')
|
1441 |
+
gr.Markdown("#### ๐ ์ปค์คํ
๋จ๋ฐฑ์ง ์ํ์ค")
|
1442 |
+
output_seq = gr.Textbox(label="์ปค์คํ
๋จ๋ฐฑ์ง ์์ด")
|
1443 |
+
gr.Markdown("#### ๐พ ์ปค์คํ
๋จ๋ฐฑ์ง ๋ฐ์ดํฐ")
|
1444 |
+
output_pdb = gr.File(label="์ปค์คํ
๋จ๋ฐฑ์ง ํ์ผ")
|
1445 |
+
gr.Markdown("#### ๐ฌ ์ปค์คํ
๋จ๋ฐฑ์ง ๊ตฌ์กฐ")
|
1446 |
output_viewer = gr.HTML()
|
1447 |
|
1448 |
# ์ด๋ฒคํธ ์ฐ๊ฒฐ
|