Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
#13
by
Yanisadel
- opened
app.py
CHANGED
@@ -31,7 +31,8 @@ def run_chatnt(dna_text, fasta_file, custom_question):
|
|
31 |
if dna_text and dna_text.strip():
|
32 |
dna_sequence = dna_text.strip().replace("\n", "")
|
33 |
elif fasta_file is not None:
|
34 |
-
|
|
|
35 |
lines = file_content.splitlines()
|
36 |
sequence = ""
|
37 |
for line in lines:
|
@@ -131,7 +132,7 @@ with gr.Blocks(css=css) as demo:
|
|
131 |
**Note:**
|
132 |
✅ You must use **exactly one DNA sequence** (either paste it or upload a file).
|
133 |
✅ Your question must include the `<DNA>` token **exactly once** at the position where the DNA will be inserted.
|
134 |
-
Example: *"Does this sequence
|
135 |
""")
|
136 |
|
137 |
with gr.Accordion("Logs", open=True):
|
|
|
31 |
if dna_text and dna_text.strip():
|
32 |
dna_sequence = dna_text.strip().replace("\n", "")
|
33 |
elif fasta_file is not None:
|
34 |
+
with open(fasta_file.name, "r") as f:
|
35 |
+
file_content = f.read()
|
36 |
lines = file_content.splitlines()
|
37 |
sequence = ""
|
38 |
for line in lines:
|
|
|
132 |
**Note:**
|
133 |
✅ You must use **exactly one DNA sequence** (either paste it or upload a file).
|
134 |
✅ Your question must include the `<DNA>` token **exactly once** at the position where the DNA will be inserted.
|
135 |
+
Example: *"Does this sequence `<DNA>` contain a donor splice site?"*
|
136 |
""")
|
137 |
|
138 |
with gr.Accordion("Logs", open=True):
|