Spaces:
Runtime error
Runtime error
test code smith
Browse files12345659 unmodified lines666768697071723 unmodified lines7677787980818283848586from AssistantService import GPTAssistantfrom openai.error import AuthenticationErrorimport streamlit as stimport configparserimport os59 unmodified linesst.write("Complete the API key field")except AuthenticationError:st.write("Invalid API key")if 'code_generated' in st.session_state:python_function_label = st.write("Here is your python function:")3 unmodified linesif full_content and test_code:html_data = full_contentresult = Noneexec(st.session_state['code_generated_exec'], globals())if result:st.write("data extracted successfully")# show data in tablest.table(result)else:st.write("error extracting data")123456759 unmodified lines676869707172737475767778798081828384853 unmodified lines8990919293from AssistantService import GPTAssistantfrom openai.error import AuthenticationErrorimport streamlit as stfrom langsmith.run_helpers import traceableimport configparserimport os59 unmodified linesst.write("Complete the API key field")except AuthenticationError:st.write("Invalid API key")@traceable(run_type="tool")def test_the_code(code, full_content):exec(code, globals())if result:st.write("data extracted successfully")# show data in tablest.table(result)else:st.write("error extracting data")return result or "error"if 'code_generated' in st.session_state:python_function_label = st.write("Here is your python function:")3 unmodified linesif full_content and test_code:html_data = full_contentresult = Nonetest_the_code(st.session_state['code_generated_exec'], full_content=full_content)
app.py+15-8