mohith96 commited on
Commit
96a5bdd
·
verified ·
1 Parent(s): fe634be

Delete src/app (3).py

Browse files
Files changed (1) hide show
  1. src/app (3).py +0 -36
src/app (3).py DELETED
@@ -1,36 +0,0 @@
1
- import streamlit as st
2
- from library_summarizer import llm_lib_summarizer_v1
3
- from command_generator import llm_lib_installer_v1
4
-
5
- st.title("📂 Compatible Library Summarizer")
6
-
7
- imported_libraries = st.text_area("Enter the libraries you are importing in your ipynb file:", height=200)
8
- api_key = st.text_input("Enter your Groq API Key:", type="password")
9
- task = st.text_input("Enter the task you are working on (e.g., data analysis, machine learning):", value="Basic ML task")
10
- python_version = st.selectbox("Select your Python version:", options=["3.7", "3.8", "3.9", "3.10", "3.11","3.12"], index=3)
11
-
12
- # File uploader widget
13
- uploaded_file = st.file_uploader("Choose a file", type=["txt"])
14
-
15
- if uploaded_file is not None:
16
- st.success(f"File uploaded: {uploaded_file.name}")
17
-
18
- # Read the file (decode for text files)
19
-
20
- if st.button("Generate bash command"):
21
- if imported_libraries and uploaded_file:
22
- library = imported_libraries
23
- libraries = uploaded_file.read().decode("utf-8")
24
- with st.spinner("Generating ideal pip install command..."):
25
- try:
26
- summary = llm_lib_summarizer_v1(import_string=library, api_key=api_key)
27
- st.subheader("Summary of Libraries:")
28
- st.code(summary)
29
- st.subheader("Generated pip install command:")
30
- command = llm_lib_installer_v1(imported_libs=summary, python_version="3.10", task="general", api_key=api_key, libraries=libraries)
31
- st.markdown(command)
32
- except Exception as e:
33
- st.error(f"An error occurred: {e}")
34
- else:
35
- st.error("Please enter text or upload a file.")
36
-