Spaces:
Running
Running
Commit
·
3472383
1
Parent(s):
0f1a97c
bug fix
Browse files
app.py
CHANGED
@@ -967,23 +967,26 @@ def process_input(
|
|
967 |
details = analysis.get('details', "")
|
968 |
|
969 |
img_cyclic = annotate_cyclic_structure(mol, three_letter)
|
970 |
-
|
971 |
-
summary = ""
|
972 |
-
if show_segment_details and details:
|
973 |
-
summary += "Segment Analysis:\n"
|
974 |
-
summary += details + "\n\n"
|
975 |
summary = "Summary:\n"
|
976 |
summary += f"Sequence: {three_letter}\n"
|
977 |
summary += f"One-letter code: {one_letter}\n"
|
978 |
summary += f"Is Cyclic: {'Yes' if is_cyclic else 'No'}\n"
|
979 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
980 |
if structure_files:
|
981 |
summary += "\n3D Structures Generated:\n"
|
982 |
for filepath in structure_files:
|
983 |
summary += f"- {os.path.basename(filepath)}\n"
|
984 |
|
985 |
#return summary, img_cyclic, img_linear, structure_files if structure_files else None
|
986 |
-
return summary, img_cyclic,
|
987 |
|
988 |
except Exception as e:
|
989 |
#return f"Error processing SMILES: {str(e)}", None, None, []
|
|
|
967 |
details = analysis.get('details', "")
|
968 |
|
969 |
img_cyclic = annotate_cyclic_structure(mol, three_letter)
|
970 |
+
|
|
|
|
|
|
|
|
|
971 |
summary = "Summary:\n"
|
972 |
summary += f"Sequence: {three_letter}\n"
|
973 |
summary += f"One-letter code: {one_letter}\n"
|
974 |
summary += f"Is Cyclic: {'Yes' if is_cyclic else 'No'}\n"
|
975 |
|
976 |
+
# Add segment details if requested
|
977 |
+
if show_segment_details and details:
|
978 |
+
summary += "\n" + "="*50 + "\n"
|
979 |
+
summary += "SEGMENT ANALYSIS:\n"
|
980 |
+
summary += "="*50 + "\n"
|
981 |
+
summary += details + "\n"
|
982 |
+
|
983 |
if structure_files:
|
984 |
summary += "\n3D Structures Generated:\n"
|
985 |
for filepath in structure_files:
|
986 |
summary += f"- {os.path.basename(filepath)}\n"
|
987 |
|
988 |
#return summary, img_cyclic, img_linear, structure_files if structure_files else None
|
989 |
+
return summary, img_cyclic, uaa_info
|
990 |
|
991 |
except Exception as e:
|
992 |
#return f"Error processing SMILES: {str(e)}", None, None, []
|