Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -143,12 +143,12 @@ def read_file_content(file,max_length):
|
|
143 |
return ""
|
144 |
|
145 |
def main():
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
with colupload:
|
153 |
uploaded_file = st.file_uploader("Add a file for context:", type=["xml", "json", "html", "htm", "md", "txt"])
|
154 |
|
|
|
143 |
return ""
|
144 |
|
145 |
def main():
|
146 |
+
# max_length = 12000 - optimal for gpt35 turbo. 2x=24000 for gpt4. 8x=96000 for gpt4-32k.
|
147 |
+
max_length = st.sidebar.slider("File section length for large files", min_value=1000, max_value=128000, value=12000, step=1000)
|
148 |
+
|
149 |
+
colprompt, colupload = st.columns([5,1]) # adjust the ratio as needed
|
150 |
+
with colprompt:
|
151 |
+
user_prompt = st.text_area("Enter prompts, instructions & questions:", '', height=100)
|
152 |
with colupload:
|
153 |
uploaded_file = st.file_uploader("Add a file for context:", type=["xml", "json", "html", "htm", "md", "txt"])
|
154 |
|