alexkueck commited on
Commit
3212003
1 Parent(s): 055ec6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -166,15 +166,13 @@ def process_image(image_path, prompt):
166
  #shutil.copy(temp_image_path, target_image_path)
167
 
168
  # Convert image to base64
169
- #with open(image_path, "rb") as image_file:
170
- with open("/home/user/app/data/history/bbb_1.png", "rb") as image_file:
171
  encoded_string = b64encode(image_file.read()).decode()
172
- print ("encoded string.................")
173
- print(encoded_string)
174
 
175
  # Prepare the data for the API request (specific to the API you're using)
176
  data = {
177
- 'image': "/home/user/app/data/history/bbb_1.png", #encoded_string,
178
  'input': prompt,
179
  }
180
  return data
 
166
  #shutil.copy(temp_image_path, target_image_path)
167
 
168
  # Convert image to base64
169
+ with open(image_path, "rb") as image_file:
 
170
  encoded_string = b64encode(image_file.read()).decode()
171
+
 
172
 
173
  # Prepare the data for the API request (specific to the API you're using)
174
  data = {
175
+ 'image': encoded_string,
176
  'input': prompt,
177
  }
178
  return data