Spaces:
Build error
Build error
Commit
·
4f9dc3a
1
Parent(s):
8d2a3b9
Update app.py
Browse files
app.py
CHANGED
@@ -97,13 +97,16 @@ with gr.Blocks() as demo:
|
|
97 |
|
98 |
with gr.Tab("Instructor Only"):
|
99 |
with gr.Blocks():
|
|
|
|
|
|
|
100 |
file_input = gr.File(label="Load a .txt or .py file",
|
101 |
file_types=['.py', '.txt'], type="file",
|
102 |
elem_classes="short-height")
|
103 |
instructor_prompt = gr.Textbox(label="Verify your prompt content", visible=True)
|
104 |
file_input.upload(fn=get_instructor_prompt, inputs=file_input, outputs=instructor_prompt)
|
|
|
105 |
prompt_submit_btn = gr.Button("Submit")
|
106 |
-
test_secret = gr.Textbox(label="Current secret prompt")
|
107 |
prompt_submit_btn.click(fn=embed_prompt, inputs=instructor_prompt, outputs=test_secret)
|
108 |
|
109 |
demo.queue().launch(server_name='0.0.0.0', server_port=7860)
|
|
|
97 |
|
98 |
with gr.Tab("Instructor Only"):
|
99 |
with gr.Blocks():
|
100 |
+
# testing purpose, change visible to False at deployment
|
101 |
+
test_secret = gr.Textbox(label="Current secret prompt", value=os.environ.get("SECRET_PROMPT"), visible=True)
|
102 |
+
|
103 |
file_input = gr.File(label="Load a .txt or .py file",
|
104 |
file_types=['.py', '.txt'], type="file",
|
105 |
elem_classes="short-height")
|
106 |
instructor_prompt = gr.Textbox(label="Verify your prompt content", visible=True)
|
107 |
file_input.upload(fn=get_instructor_prompt, inputs=file_input, outputs=instructor_prompt)
|
108 |
+
|
109 |
prompt_submit_btn = gr.Button("Submit")
|
|
|
110 |
prompt_submit_btn.click(fn=embed_prompt, inputs=instructor_prompt, outputs=test_secret)
|
111 |
|
112 |
demo.queue().launch(server_name='0.0.0.0', server_port=7860)
|