@danhachuel/thunderbolt 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/influencers_ui.py +9 -9
- package/app/main.py +191 -209
- package/hermes_ui/notifications.py +1 -5
- package/package.json +2 -1
- package/scripts/cli.mjs +2 -1
- package/scripts/streamlit_bootstrap.py +34 -0
- package/seed/references/tutorial-api-canvas.md +0 -112
package/app/influencers_ui.py
CHANGED
|
@@ -191,7 +191,7 @@ def render_ai_influencer_characters(
|
|
|
191
191
|
key="influencer_new_assets",
|
|
192
192
|
help="Pode seleccionar várias imagens e ficheiros .md/.json no mesmo upload.",
|
|
193
193
|
)
|
|
194
|
-
create = st.form_submit_button("Guardar personagem", type="primary",
|
|
194
|
+
create = st.form_submit_button("Guardar personagem", type="primary", use_container_width=True)
|
|
195
195
|
if create:
|
|
196
196
|
try:
|
|
197
197
|
record = repository.create_influencer({"name": name, "bio": bio, "language": language, "instagram_business_id": instagram_id})
|
|
@@ -250,7 +250,7 @@ def render_ai_influencer_characters(
|
|
|
250
250
|
accept_multiple_files=True,
|
|
251
251
|
key=f"influencer_append_assets_{selected_id}",
|
|
252
252
|
)
|
|
253
|
-
append_assets = st.form_submit_button("Adicionar assets ao personagem",
|
|
253
|
+
append_assets = st.form_submit_button("Adicionar assets ao personagem", use_container_width=True)
|
|
254
254
|
if append_assets:
|
|
255
255
|
try:
|
|
256
256
|
saved_assets = 0
|
|
@@ -276,7 +276,7 @@ def render_ai_influencer_characters(
|
|
|
276
276
|
st.caption(_asset_label(asset))
|
|
277
277
|
path = _local_asset_path(asset)
|
|
278
278
|
if str(asset.get("asset_type") or "") == "image" and path:
|
|
279
|
-
st.image(str(path),
|
|
279
|
+
st.image(str(path), use_container_width=True)
|
|
280
280
|
elif str(asset.get("asset_type") or "") == "document":
|
|
281
281
|
raw = str(asset.get("document_json") or "")
|
|
282
282
|
try:
|
|
@@ -305,7 +305,7 @@ def _render_content_history(repository: Any, influencer_id: str = "") -> None:
|
|
|
305
305
|
preview_col, detail_col = st.columns([1.25, 2.75])
|
|
306
306
|
with preview_col:
|
|
307
307
|
if artifact.is_file() and content_type == "image":
|
|
308
|
-
st.image(str(artifact), caption=f"{type_label} gerada",
|
|
308
|
+
st.image(str(artifact), caption=f"{type_label} gerada", use_container_width=True)
|
|
309
309
|
elif artifact.is_file() and content_type == "video":
|
|
310
310
|
st.video(str(artifact))
|
|
311
311
|
else:
|
|
@@ -325,7 +325,7 @@ def _render_content_history(repository: Any, influencer_id: str = "") -> None:
|
|
|
325
325
|
file_name=artifact.name,
|
|
326
326
|
mime=mime,
|
|
327
327
|
key=f"influencer_content_download_{content_type}_{content_id}",
|
|
328
|
-
|
|
328
|
+
use_container_width=True,
|
|
329
329
|
)
|
|
330
330
|
|
|
331
331
|
|
|
@@ -370,7 +370,7 @@ def render_motion_control(settings: dict[str, Any]) -> None:
|
|
|
370
370
|
image_upload = st.file_uploader("Imagem de referência", type=["jpg", "jpeg", "png"], key="motion_control_image")
|
|
371
371
|
prompt = st.text_area("Prompt (opcional)", height=120, max_chars=2500, placeholder="Descreva como preservar a identidade da imagem e aplicar o movimento…", key="motion_control_prompt")
|
|
372
372
|
provider_id = st.selectbox("Provider / modelo", card_options, format_func=lambda value: _provider_label(next(card for card in cards if str(card.get("id")) == value)), key="motion_control_provider")
|
|
373
|
-
generate = st.form_submit_button("Gerar Motion Control", type="primary",
|
|
373
|
+
generate = st.form_submit_button("Gerar Motion Control", type="primary", use_container_width=True)
|
|
374
374
|
if generate:
|
|
375
375
|
if video_upload is None or image_upload is None:
|
|
376
376
|
st.error("Seleccione o vídeo original e a imagem de referência.")
|
|
@@ -445,7 +445,7 @@ def render_ugc_products(settings: dict[str, Any]) -> None:
|
|
|
445
445
|
st.info("Não existe um provider activo no pool de imagem; será usada a imagem original.")
|
|
446
446
|
card_options = [str(card.get("id") or "") for card in video_cards]
|
|
447
447
|
provider_id = st.selectbox("Provider VEO3", card_options, format_func=lambda value: _provider_label(next(card for card in video_cards if str(card.get("id")) == value)), key="ugc_products_video_provider")
|
|
448
|
-
generate = st.form_submit_button("Gerar UGC Product", type="primary",
|
|
448
|
+
generate = st.form_submit_button("Gerar UGC Product", type="primary", use_container_width=True)
|
|
449
449
|
if generate:
|
|
450
450
|
if product_upload is None:
|
|
451
451
|
st.error("Seleccione a imagem do produto.")
|
|
@@ -526,7 +526,7 @@ def render_ai_influencer_content(settings: dict[str, Any]) -> None:
|
|
|
526
526
|
caption = st.text_area("Legenda/caption (opcional)", height=90, key="content_image_caption")
|
|
527
527
|
platforms = st.multiselect("Redes sociais de destino", PLATFORM_OPTIONS, default=["Instagram"], key="content_image_platforms")
|
|
528
528
|
provider_id = st.selectbox("Provider / modelo", provider_options, format_func=lambda value: _provider_label(next(card for card in cards if str(card.get("id")) == value)), key="content_image_provider") if cards else ""
|
|
529
|
-
generate = st.form_submit_button("Gerar imagem", type="primary",
|
|
529
|
+
generate = st.form_submit_button("Gerar imagem", type="primary", use_container_width=True)
|
|
530
530
|
if generate:
|
|
531
531
|
if not prompt.strip():
|
|
532
532
|
st.error("Informe o prompt da imagem.")
|
|
@@ -574,7 +574,7 @@ def render_ai_influencer_content(settings: dict[str, Any]) -> None:
|
|
|
574
574
|
caption = st.text_area("Legenda/caption (opcional)", height=90, key="content_video_caption")
|
|
575
575
|
platforms = st.multiselect("Redes sociais de destino", PLATFORM_OPTIONS, default=["Instagram", "TikTok"], key="content_video_platforms")
|
|
576
576
|
provider_id = st.selectbox("Provider / modelo de vídeo", provider_options, format_func=lambda value: _provider_label(next(card for card in cards if str(card.get("id")) == value)), key="content_video_provider") if cards else ""
|
|
577
|
-
generate = st.form_submit_button("Gerar vídeo", type="primary",
|
|
577
|
+
generate = st.form_submit_button("Gerar vídeo", type="primary", use_container_width=True)
|
|
578
578
|
if generate:
|
|
579
579
|
if not prompt.strip():
|
|
580
580
|
st.error("Informe o prompt de movimento.")
|