Spaces:
Running
Running
Commit
·
5ac27c1
1
Parent(s):
ad4a786
add more functions
Browse files
app.py
CHANGED
@@ -449,7 +449,8 @@ iface = gr.Interface(
|
|
449 |
),
|
450 |
gr.File(
|
451 |
label="Or upload a text file with SMILES",
|
452 |
-
file_types=[".txt"]
|
|
|
453 |
),
|
454 |
gr.Checkbox(
|
455 |
label="Show linear representation"
|
@@ -479,14 +480,14 @@ iface = gr.Interface(
|
|
479 |
Input: Either enter a SMILES string directly or upload a text file
|
480 |
""",
|
481 |
examples=[
|
482 |
-
[
|
483 |
"CC(C)C[C@@H]1NC(=O)[C@@H]2CCCN2C(=O)[C@@H](CC(C)C)NC(=O)[C@@H](CC(C)C)N(C)C(=O)[C@H](C)NC(=O)[C@H](Cc2ccccc2)NC1=O",
|
484 |
-
|
485 |
True
|
486 |
],
|
487 |
-
[
|
488 |
"CC(C)C[C@@H]1OC(=O)[C@H](C)NC(=O)[C@H](C(C)C)OC(=O)[C@H](C)N(C)C(=O)[C@@H](C)NC(=O)[C@@H](Cc2ccccc2)N(C)C1=O",
|
489 |
-
|
490 |
True
|
491 |
]
|
492 |
],
|
|
|
449 |
),
|
450 |
gr.File(
|
451 |
label="Or upload a text file with SMILES",
|
452 |
+
file_types=[".txt"],
|
453 |
+
optional=True # Make file input optional
|
454 |
),
|
455 |
gr.Checkbox(
|
456 |
label="Show linear representation"
|
|
|
480 |
Input: Either enter a SMILES string directly or upload a text file
|
481 |
""",
|
482 |
examples=[
|
483 |
+
[
|
484 |
"CC(C)C[C@@H]1NC(=O)[C@@H]2CCCN2C(=O)[C@@H](CC(C)C)NC(=O)[C@@H](CC(C)C)N(C)C(=O)[C@H](C)NC(=O)[C@H](Cc2ccccc2)NC1=O",
|
485 |
+
gr.File.update(visible=False), # Hide file input for examples
|
486 |
True
|
487 |
],
|
488 |
+
[
|
489 |
"CC(C)C[C@@H]1OC(=O)[C@H](C)NC(=O)[C@H](C(C)C)OC(=O)[C@H](C)N(C)C(=O)[C@@H](C)NC(=O)[C@@H](Cc2ccccc2)N(C)C1=O",
|
490 |
+
gr.File.update(visible=False), # Hide file input for examples
|
491 |
True
|
492 |
]
|
493 |
],
|