Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -175,6 +175,13 @@ def analyze_dna(username, password, sequence, model_name):
|
|
175 |
except Exception as e:
|
176 |
return {"error": str(e)}, ""
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
# Create a Gradio interface
|
179 |
demo = gr.Interface(
|
180 |
fn=analyze_dna,
|
@@ -187,8 +194,8 @@ demo = gr.Interface(
|
|
187 |
"CNN"
|
188 |
])
|
189 |
],
|
190 |
-
outputs=["json",
|
191 |
)
|
192 |
|
193 |
# Launch the interface
|
194 |
-
demo.launch()
|
|
|
175 |
except Exception as e:
|
176 |
return {"error": str(e)}, ""
|
177 |
|
178 |
+
# Check if the current version of Gradio supports HTML output
|
179 |
+
try:
|
180 |
+
html_output = gr.HTML
|
181 |
+
except AttributeError:
|
182 |
+
# Fallback or custom handling if HTML is not supported
|
183 |
+
html_output = gr.Textbox # You can replace this with an appropriate component
|
184 |
+
|
185 |
# Create a Gradio interface
|
186 |
demo = gr.Interface(
|
187 |
fn=analyze_dna,
|
|
|
194 |
"CNN"
|
195 |
])
|
196 |
],
|
197 |
+
outputs=["json", html_output]
|
198 |
)
|
199 |
|
200 |
# Launch the interface
|
201 |
+
demo.launch()
|