Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ def analyze_dna(sequence, password):
|
|
114 |
image_base64 = base64.b64encode(buf.read()).decode('utf-8')
|
115 |
buf.close()
|
116 |
|
117 |
-
return
|
118 |
|
119 |
except Exception as e:
|
120 |
return {"error": str(e)}, ""
|
@@ -123,7 +123,7 @@ def analyze_dna(sequence, password):
|
|
123 |
demo = gr.Interface(
|
124 |
fn=analyze_dna,
|
125 |
inputs=[gr.Textbox(label="DNA Sequence"), gr.Textbox(label="Password", type="password")],
|
126 |
-
outputs=["
|
127 |
)
|
128 |
|
129 |
# Launch the interface
|
|
|
114 |
image_base64 = base64.b64encode(buf.read()).decode('utf-8')
|
115 |
buf.close()
|
116 |
|
117 |
+
return f'<img src="data:image/png;base64,{image_base64}" />'
|
118 |
|
119 |
except Exception as e:
|
120 |
return {"error": str(e)}, ""
|
|
|
123 |
demo = gr.Interface(
|
124 |
fn=analyze_dna,
|
125 |
inputs=[gr.Textbox(label="DNA Sequence"), gr.Textbox(label="Password", type="password")],
|
126 |
+
outputs=["html"]
|
127 |
)
|
128 |
|
129 |
# Launch the interface
|