Update app.py
Browse files
app.py
CHANGED
@@ -41,11 +41,6 @@ st.markdown("[
|
42 |
st.write("[UPDATE] Hosting the service is costly, so I’ve enabled the spot instance feature. DM me if you need access.")
|
43 |
|
44 |
-
# Status
|
45 |
-
monolith_status = get_status()
|
46 |
-
worker_status = ''.join(['🟢' if worker_status else '🟡' for worker_status in monolith_status['worker_status']])
|
47 |
-
st.write(f"{worker_status}")
|
48 |
-
|
49 |
# Language
|
50 |
lang = st.selectbox("Language?", lang_map.keys(), help="the language for submission.")
|
51 |
editor_language = lang_map[lang][0]
|
@@ -74,6 +69,11 @@ editor_buttons = [{
|
|
74 |
code_prompt = lang_map[lang][2]
|
75 |
response_dict = code_editor(code_prompt, lang=editor_language, height=[15,15], options={"wrap": False}, buttons=editor_buttons)
|
76 |
|
|
|
|
|
|
|
|
|
|
|
77 |
if response_dict['type'] == 'submit':
|
78 |
code = response_dict['text']
|
79 |
my_bar = st.progress(0, text=f"Code Execution is Processing...")
|
|
|
41 |
st.write("Please feel free to have a try. Should you have any question, contact [email protected]")
|
42 |
st.write("[UPDATE] Hosting the service is costly, so I’ve enabled the spot instance feature. DM me if you need access.")
|
43 |
|
|
|
|
|
|
|
|
|
|
|
44 |
# Language
|
45 |
lang = st.selectbox("Language?", lang_map.keys(), help="the language for submission.")
|
46 |
editor_language = lang_map[lang][0]
|
|
|
69 |
code_prompt = lang_map[lang][2]
|
70 |
response_dict = code_editor(code_prompt, lang=editor_language, height=[15,15], options={"wrap": False}, buttons=editor_buttons)
|
71 |
|
72 |
+
# Status
|
73 |
+
monolith_status = get_status()
|
74 |
+
worker_status = ''.join(['🟢' if worker_status else '🟡' for worker_status in monolith_status['worker_status']])
|
75 |
+
st.write(f"{worker_status}")
|
76 |
+
|
77 |
if response_dict['type'] == 'submit':
|
78 |
code = response_dict['text']
|
79 |
my_bar = st.progress(0, text=f"Code Execution is Processing...")
|