awacke1 commited on
Commit
45dfb45
·
1 Parent(s): f427745

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -61,7 +61,6 @@ def chat_with_model(prompt, document_section):
61
  response = openai.ChatCompletion.create(model=model, messages=conversation)
62
  return response['choices'][0]['message']['content']
63
 
64
-
65
  def get_table_download_link(file_path):
66
  with open(file_path, 'r') as file:
67
  data = file.read()
@@ -79,7 +78,6 @@ def get_table_download_link(file_path):
79
  href = f'<a href="data:{mime_type};base64,{b64}" target="_blank" download="{file_name}">{file_name}</a>'
80
  return href
81
 
82
-
83
  def CompressXML(xml_text):
84
  root = ET.fromstring(xml_text)
85
  for elem in list(root.iter()):
@@ -111,7 +109,7 @@ def read_file_content(file,max_length):
111
  def main():
112
  user_prompt = st.text_area("Your question:", '', height=120)
113
 
114
- collength, colupload = st.columns([4,1]) # adjust the ratio as needed
115
  with collength:
116
  #max_length = 12000 - optimal for gpt35 turbo. 2x=24000 for gpt4. 8x=96000 for gpt4-32k.
117
  max_length = st.slider("Context Section Length", min_value=1000, max_value=128000, value=12000, step=1000)
 
61
  response = openai.ChatCompletion.create(model=model, messages=conversation)
62
  return response['choices'][0]['message']['content']
63
 
 
64
  def get_table_download_link(file_path):
65
  with open(file_path, 'r') as file:
66
  data = file.read()
 
78
  href = f'<a href="data:{mime_type};base64,{b64}" target="_blank" download="{file_name}">{file_name}</a>'
79
  return href
80
 
 
81
  def CompressXML(xml_text):
82
  root = ET.fromstring(xml_text)
83
  for elem in list(root.iter()):
 
109
  def main():
110
  user_prompt = st.text_area("Your question:", '', height=120)
111
 
112
+ collength, colupload = st.columns([2,3]) # adjust the ratio as needed
113
  with collength:
114
  #max_length = 12000 - optimal for gpt35 turbo. 2x=24000 for gpt4. 8x=96000 for gpt4-32k.
115
  max_length = st.slider("Context Section Length", min_value=1000, max_value=128000, value=12000, step=1000)