Spaces:
Build error
Build error
Commit ·
4e33c9b
1
Parent(s): 403a26d
update: add sidebar and markdowm format
Browse files11 unmodified lines1213141516171819202122232425262728293011 unmodified linesst.title("Code Analysis with LLMs")code_input_method = st.radio("How would you like to provide your code?", ("Paste Code", "Upload Code File"))code_text = ""if code_input_method == "Paste Code":code_text = st.text_area("Paste your code here:")elif code_input_method == "Upload Code File":uploaded_file = st.file_uploader("Upload your code file", type=["py", "txt"])if uploaded_file is not None:code_text = uploaded_file.read().decode("utf-8")model_choice = st.selectbox("Select LLM Model", ["llama3-8b-8192", "gpt-4", "gpt-3.5-turbo"])if st.button("Analyze Code") and code_text:llm_obj = LLMClient(client)processor = CodeProcessor(llm_obj)11 unmodified lines12131415161718192021222324252627282930313211 unmodified linesst.title("Code Analysis with LLMs")st.sidebar.title("Input Options")code_input_method = st.sidebar.radio("How would you like to provide your code?", ("Paste Code", "Upload Code File"))code_text = ""if code_input_method == "Paste Code":code_text = st.sidebar.text_area("Paste your code here:")elif code_input_method == "Upload Code File":uploaded_file = st.sidebar.file_uploader("Upload your code file", type=["py", "txt"])if uploaded_file is not None:code_text = uploaded_file.read().decode("utf-8")model_choice = st.sidebar.selectbox("Select LLM Model", ["llama-3.2-90b-text-preview", "llama-3.2-90b-text-preview", "llama3-8b-8192"])if st.sidebar.button("Analyze Code") and code_text:llm_obj = LLMClient(client)processor = CodeProcessor(llm_obj)
68 unmodified lines69707172737475767778798081828384858668 unmodified lines**{summary_response}**---# Detailed Code Explanation for Snippet{detail_generation_response}---# Similar Code Generation Prompt for Code Snippets{prompt_for_generating_similar_code_response}---"""return markdown_output68 unmodified lines69707172737475767778798081828384858668 unmodified lines**{summary_response}**# Detailed Code Explanation for Snippet{detail_generation_response}# Similar Code Generation Prompt for Code Snippets{prompt_for_generating_similar_code_response}"""return markdown_output
app.py+7-5
logic.py+3-3