aasherkamal216 commited on
Commit
bd1502e
·
unverified ·
1 Parent(s): d467b3b

Update test4.py

Browse files
Files changed (1) hide show
  1. test4.py +2 -1
test4.py CHANGED
@@ -98,7 +98,7 @@ def base64_to_temp_file(base64_string, unique_name, file_extension):
98
  temp_file_path = f"{unique_name}.{file_extension}"
99
  with open(temp_file_path, "wb") as temp_file:
100
  temp_file.write(file_bytes.read())
101
- time.sleep(10)
102
  return temp_file_path
103
 
104
 
@@ -133,6 +133,7 @@ def messages_to_gemini(messages):
133
  try:
134
  with st.spinner(f"Sending {content['type'].replace('_', ' ')} to Gemini..."):
135
  gemini_message["parts"].append(genai.upload_file(path=temp_file_path))
 
136
  break
137
 
138
  except FailedPrecondition as e:
 
98
  temp_file_path = f"{unique_name}.{file_extension}"
99
  with open(temp_file_path, "wb") as temp_file:
100
  temp_file.write(file_bytes.read())
101
+ time.sleep(1)
102
  return temp_file_path
103
 
104
 
 
133
  try:
134
  with st.spinner(f"Sending {content['type'].replace('_', ' ')} to Gemini..."):
135
  gemini_message["parts"].append(genai.upload_file(path=temp_file_path))
136
+ st.write("Huraaaa")
137
  break
138
 
139
  except FailedPrecondition as e: