Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -72,9 +72,7 @@ def load_model():
|
|
72 |
model, tokenizer = load_model()
|
73 |
|
74 |
def analyze_dna(sequence, password):
|
75 |
-
|
76 |
-
# put password into hidden HF variable later
|
77 |
-
if password != "test_pw":
|
78 |
return {"error": "Invalid password"}, ""
|
79 |
|
80 |
try:
|
@@ -113,7 +111,7 @@ def analyze_dna(sequence, password):
|
|
113 |
# Create a Gradio interface
|
114 |
demo = gr.Interface(
|
115 |
fn=analyze_dna,
|
116 |
-
inputs=[gr.
|
117 |
outputs=["json", "html"]
|
118 |
)
|
119 |
|
|
|
72 |
model, tokenizer = load_model()
|
73 |
|
74 |
def analyze_dna(sequence, password):
|
75 |
+
if password != "your_password_here":
|
|
|
|
|
76 |
return {"error": "Invalid password"}, ""
|
77 |
|
78 |
try:
|
|
|
111 |
# Create a Gradio interface
|
112 |
demo = gr.Interface(
|
113 |
fn=analyze_dna,
|
114 |
+
inputs=[gr.Textbox(label="DNA Sequence"), gr.Textbox(label="Password", type="password")],
|
115 |
outputs=["json", "html"]
|
116 |
)
|
117 |
|