Spaces:
Sleeping
Sleeping
Commit
·
285119c
1
Parent(s):
0749d19
atualizacao app2
Browse files
app.py
CHANGED
@@ -153,11 +153,13 @@ def extract_media_files(file_path: str):
|
|
153 |
return media_files
|
154 |
|
155 |
def list_components_in_aia_file(file_path):
|
|
|
156 |
results_df = pd.DataFrame(columns=[
|
157 |
'aia_file', 'project_info', 'components', 'IA components', 'screens', 'operators',
|
158 |
'variables', 'events', 'extensions', 'Media',
|
159 |
'Drawing and Animation', 'Maps', 'Sensors', 'Social', 'Storage', 'Connectivity'])
|
160 |
-
|
|
|
161 |
pd.set_option('display.max_colwidth', None)
|
162 |
file_name = os.path.basename(file_path)
|
163 |
# ... restante do código ...
|
@@ -217,7 +219,7 @@ def list_components_in_aia_file(file_path):
|
|
217 |
components_count = collections.Counter(components_list)
|
218 |
components_summary = [f'{comp} ({count} x)' if count > 1 else comp for comp, count in components_count.items()]
|
219 |
ai_components_summary = extract_ai_components(components_list)
|
220 |
-
|
221 |
'aia_file': file_name,
|
222 |
'project_info': project_info_str,
|
223 |
'components': ', '.join(components_summary),
|
@@ -234,10 +236,12 @@ def list_components_in_aia_file(file_path):
|
|
234 |
'Social': social_summary,
|
235 |
'Storage': storage_summary,
|
236 |
'Connectivity': connectivity_summary
|
237 |
-
}
|
238 |
-
|
239 |
|
|
|
|
|
240 |
return results_df
|
|
|
241 |
|
242 |
# Define a altura máxima para o output e habilite a rolagem
|
243 |
# Adicione a variável de estilo CSS ao início do seu código, fora da função analyze_aia
|
|
|
153 |
return media_files
|
154 |
|
155 |
def list_components_in_aia_file(file_path):
|
156 |
+
# Inicialize results_df aqui
|
157 |
results_df = pd.DataFrame(columns=[
|
158 |
'aia_file', 'project_info', 'components', 'IA components', 'screens', 'operators',
|
159 |
'variables', 'events', 'extensions', 'Media',
|
160 |
'Drawing and Animation', 'Maps', 'Sensors', 'Social', 'Storage', 'Connectivity'])
|
161 |
+
|
162 |
+
|
163 |
pd.set_option('display.max_colwidth', None)
|
164 |
file_name = os.path.basename(file_path)
|
165 |
# ... restante do código ...
|
|
|
219 |
components_count = collections.Counter(components_list)
|
220 |
components_summary = [f'{comp} ({count} x)' if count > 1 else comp for comp, count in components_count.items()]
|
221 |
ai_components_summary = extract_ai_components(components_list)
|
222 |
+
new_row = pd.DataFrame([{
|
223 |
'aia_file': file_name,
|
224 |
'project_info': project_info_str,
|
225 |
'components': ', '.join(components_summary),
|
|
|
236 |
'Social': social_summary,
|
237 |
'Storage': storage_summary,
|
238 |
'Connectivity': connectivity_summary
|
239 |
+
}])
|
|
|
240 |
|
241 |
+
# Concatene new_row ao results_df
|
242 |
+
results_df = pd.concat([results_df, new_row], ignore_index=True)
|
243 |
return results_df
|
244 |
+
#
|
245 |
|
246 |
# Define a altura máxima para o output e habilite a rolagem
|
247 |
# Adicione a variável de estilo CSS ao início do seu código, fora da função analyze_aia
|