Spaces:
Running
Running
Commit
·
a0d49a3
1
Parent(s):
e2dd340
debug
Browse files
app.py
CHANGED
|
@@ -990,16 +990,11 @@ def process_input(
|
|
| 990 |
#summary += f"Aromatic Cycles: {', '.join(aromatic_cycles)}\n"
|
| 991 |
|
| 992 |
if structure_files:
|
| 993 |
-
|
| 994 |
-
|
| 995 |
-
|
| 996 |
-
zf.write(fpath, os.path.basename(fpath))
|
| 997 |
-
# return the single ZIP instead of a list of SDFs:
|
| 998 |
-
return summary, img_cyclic, img_linear, zip_path
|
| 999 |
-
else:
|
| 1000 |
-
return summary, img_cyclic, img_linear, None
|
| 1001 |
|
| 1002 |
-
|
| 1003 |
|
| 1004 |
except Exception as e:
|
| 1005 |
return f"Error processing SMILES: {str(e)}", None, None, []
|
|
@@ -1092,7 +1087,7 @@ iface = gr.Interface(
|
|
| 1092 |
),
|
| 1093 |
gr.File(
|
| 1094 |
label="3D Structure Files",
|
| 1095 |
-
file_count=
|
| 1096 |
)
|
| 1097 |
],
|
| 1098 |
title="Peptide Structure Analyzer and Visualizer",
|
|
|
|
| 990 |
#summary += f"Aromatic Cycles: {', '.join(aromatic_cycles)}\n"
|
| 991 |
|
| 992 |
if structure_files:
|
| 993 |
+
summary += "\n3D Structures Generated:\n"
|
| 994 |
+
for filepath in structure_files:
|
| 995 |
+
summary += f"- {os.path.basename(filepath)}\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 996 |
|
| 997 |
+
return summary, img_cyclic, img_linear, structure_files if structure_files else None
|
| 998 |
|
| 999 |
except Exception as e:
|
| 1000 |
return f"Error processing SMILES: {str(e)}", None, None, []
|
|
|
|
| 1087 |
),
|
| 1088 |
gr.File(
|
| 1089 |
label="3D Structure Files",
|
| 1090 |
+
file_count="multiple"
|
| 1091 |
)
|
| 1092 |
],
|
| 1093 |
title="Peptide Structure Analyzer and Visualizer",
|