Spaces:
Runtime error
Runtime error
Haseeb commited on
Commit ·
8c2b5b9
1
Parent(s): 8b9f851
Added Upload data code
Browse files- bardcode_interpreter.py +10 -9
- uploads/Scores.txt +5 -0
bardcode_interpreter.py
CHANGED
|
@@ -439,6 +439,14 @@ if __name__ == "__main__":
|
|
| 439 |
if character_count > BARD_FILE_SIZE_LIMIT or st.session_state.file_char_count > BARD_FILE_SIZE_LIMIT:
|
| 440 |
st.error(f"Error in prompt The file size limit exceeded {BARD_FILE_SIZE_LIMIT} characters")
|
| 441 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
# Adding the upload file option
|
| 443 |
uploaded_file = st.file_uploader("Choose a file")
|
| 444 |
if uploaded_file is not None:
|
|
@@ -462,14 +470,7 @@ if __name__ == "__main__":
|
|
| 462 |
|
| 463 |
# Display a success message
|
| 464 |
st.success("File uploaded successfully.")
|
| 465 |
-
|
| 466 |
-
# Setting options for the application
|
| 467 |
-
with st.expander("Options"):
|
| 468 |
-
code_file = st.text_input("Filename for the generated code (without extension):", value="generated_code")
|
| 469 |
-
code_choices = st.text_input("Filename for code choices:", value="code_choices")
|
| 470 |
-
expected_output = st.text_input("Expected output (leave blank if none):")
|
| 471 |
-
exec_type = st.selectbox("Execution type:", ["single", "multiple"], index=0)
|
| 472 |
-
timeout_delay = st.number_input("Timeout (in seconds):", value=10)
|
| 473 |
|
| 474 |
with st.expander("Settings"):
|
| 475 |
bard_key_help_text = """
|
|
@@ -626,4 +627,4 @@ if __name__ == "__main__":
|
|
| 626 |
# show_outputf the stack trace
|
| 627 |
stack_trace = traceback.format_exc()
|
| 628 |
st.error("Error: " + str(e))
|
| 629 |
-
st.error(stack_trace)
|
|
|
|
| 439 |
if character_count > BARD_FILE_SIZE_LIMIT or st.session_state.file_char_count > BARD_FILE_SIZE_LIMIT:
|
| 440 |
st.error(f"Error in prompt The file size limit exceeded {BARD_FILE_SIZE_LIMIT} characters")
|
| 441 |
|
| 442 |
+
# Setting options for the application
|
| 443 |
+
with st.expander("Options"):
|
| 444 |
+
code_file = st.text_input("Filename for the generated code (without extension):", value="generated_code")
|
| 445 |
+
code_choices = st.text_input("Filename for code choices:", value="code_choices")
|
| 446 |
+
expected_output = st.text_input("Expected output (leave blank if none):")
|
| 447 |
+
exec_type = st.selectbox("Execution type:", ["single", "multiple"], index=0)
|
| 448 |
+
timeout_delay = st.number_input("Timeout (in seconds):", value=10)
|
| 449 |
+
|
| 450 |
# Adding the upload file option
|
| 451 |
uploaded_file = st.file_uploader("Choose a file")
|
| 452 |
if uploaded_file is not None:
|
|
|
|
| 470 |
|
| 471 |
# Display a success message
|
| 472 |
st.success("File uploaded successfully.")
|
| 473 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 474 |
|
| 475 |
with st.expander("Settings"):
|
| 476 |
bard_key_help_text = """
|
|
|
|
| 627 |
# show_outputf the stack trace
|
| 628 |
stack_trace = traceback.format_exc()
|
| 629 |
st.error("Error: " + str(e))
|
| 630 |
+
st.error(stack_trace)
|
uploads/Scores.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ChatGPT = 5
|
| 2 |
+
GoogleBard = 2
|
| 3 |
+
BingChat = 4
|
| 4 |
+
OpenAssistant = 0
|
| 5 |
+
HuggingChat = 0
|