user-agent commited on
Commit
540630a
1 Parent(s): 0fdfbbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -100,9 +100,17 @@ def get_predicted_attributes(image_urls, category):
100
  # Clean up the results into one long string
101
  for i, result in enumerate(common_result):
102
  common_result[i] = ", ".join([f"{x[0]}" for x in result])
 
 
103
 
 
 
 
 
 
 
104
 
105
- return common_result
106
 
107
 
108
 
 
100
  # Clean up the results into one long string
101
  for i, result in enumerate(common_result):
102
  common_result[i] = ", ".join([f"{x[0]}" for x in result])
103
+
104
+ result = {}
105
 
106
+ # Iterate through the list and split each item into key and value
107
+ for item in common_result:
108
+ # Split by ': ' to separate the key and value
109
+ key, value = item.split(': ', 1)
110
+ # Add to the dictionary
111
+ result[key] = value
112
 
113
+ return result
114
 
115
 
116