Spaces:
Running
Running
Commit
·
1dea712
1
Parent(s):
1367fa8
fix: minor issue
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
import streamlit as st
|
3 |
from datetime import datetime
|
4 |
from groq import Groq
|
@@ -20,14 +21,16 @@ code_dict = {}
|
|
20 |
|
21 |
if code_input_method == "Upload CSV file":
|
22 |
uploaded_file = st.sidebar.file_uploader("Upload your CSV/Excel file", type=["csv", "xlsx"])
|
|
|
23 |
if uploaded_file is not None:
|
24 |
-
|
|
|
25 |
|
26 |
elif code_input_method == "Upload Code File":
|
27 |
uploaded_file = st.sidebar.file_uploader("Upload your code file", type=["py", "txt"])
|
28 |
if uploaded_file is not None:
|
29 |
code_text = uploaded_file.read().decode("utf-8")
|
30 |
-
code_dict = {"single_code": code_text}
|
31 |
|
32 |
model_choice = st.sidebar.selectbox("Select LLM Model",
|
33 |
["llama-3.2-90b-text-preview", "llama-3.2-90b-text-preview", "llama3-8b-8192"])
|
|
|
1 |
import os
|
2 |
+
import pandas as pd
|
3 |
import streamlit as st
|
4 |
from datetime import datetime
|
5 |
from groq import Groq
|
|
|
21 |
|
22 |
if code_input_method == "Upload CSV file":
|
23 |
uploaded_file = st.sidebar.file_uploader("Upload your CSV/Excel file", type=["csv", "xlsx"])
|
24 |
+
|
25 |
if uploaded_file is not None:
|
26 |
+
dataframe = pd.read_csv(uploaded_file)
|
27 |
+
code_dict = csv_read_batch_code(uploaded_file)
|
28 |
|
29 |
elif code_input_method == "Upload Code File":
|
30 |
uploaded_file = st.sidebar.file_uploader("Upload your code file", type=["py", "txt"])
|
31 |
if uploaded_file is not None:
|
32 |
code_text = uploaded_file.read().decode("utf-8")
|
33 |
+
code_dict = {"single_code": code_text}
|
34 |
|
35 |
model_choice = st.sidebar.selectbox("Select LLM Model",
|
36 |
["llama-3.2-90b-text-preview", "llama-3.2-90b-text-preview", "llama3-8b-8192"])
|