Romanchello-bit commited on
Commit
dabbc92
·
1 Parent(s): 66654b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -18
app.py CHANGED
@@ -391,9 +391,27 @@ if mode == "🤖 Sales Bot CRM":
391
  # --- SETUP WITH PRODUCT INFO ---
392
  elif st.session_state.page == "setup":
393
  st.title("👤 Налаштування Дзвінка")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
  with st.form("lead_form"):
395
- c1, c2 = st.columns(2)
396
- with c1:
397
  st.markdown("### 👨‍💼 Lead Info")
398
  bot_name = st.text_input("Ваше ім'я (Менеджера)", "Олексій")
399
  name = st.text_input("Ім'я Клієнта", "Олександр")
@@ -403,22 +421,8 @@ if mode == "🤖 Sales Bot CRM":
403
  if st.checkbox("🔍 Перевірити в базі"):
404
  pass
405
 
406
- with c2:
407
- st.markdown("### 📦 Product / Service Info")
408
- url = st.text_input("Product URL", placeholder="https://example.com/product")
409
-
410
- if st.button("🤖 Fetch Product Info from URL"):
411
- if url:
412
- with st.spinner("Fetching and analyzing URL..."):
413
- scraped_info = scrape_and_summarize(url, model)
414
- if scraped_info:
415
- st.session_state.product_info = scraped_info
416
- st.success("Product info populated!")
417
- else:
418
- st.error("Failed to get product info from URL.")
419
- else:
420
- st.warning("Please enter a URL.")
421
-
422
  p_name = st.text_input("Product Name", value=st.session_state.product_info.get("product_name", ""))
423
  p_value = st.text_input("Main Benefit (Value)", value=st.session_state.product_info.get("product_value", ""))
424
  p_price = st.text_input("Price / Pricing Model", value=st.session_state.product_info.get("product_price", ""))
 
391
  # --- SETUP WITH PRODUCT INFO ---
392
  elif st.session_state.page == "setup":
393
  st.title("👤 Налаштування Дзвінка")
394
+
395
+ c1, c2 = st.columns(2)
396
+
397
+ with c2:
398
+ st.markdown("### 📦 Product / Service Info")
399
+ url = st.text_input("Product URL", placeholder="https://example.com/product")
400
+ if st.button("🤖 Fetch Product Info from URL"):
401
+ if url:
402
+ with st.spinner("Fetching and analyzing URL..."):
403
+ scraped_info = scrape_and_summarize(url, model)
404
+ if scraped_info:
405
+ st.session_state.product_info = scraped_info
406
+ st.success("Product info populated!")
407
+ else:
408
+ st.error("Failed to get product info from URL.")
409
+ else:
410
+ st.warning("Please enter a URL.")
411
+
412
  with st.form("lead_form"):
413
+ c1_form, c2_form = st.columns(2)
414
+ with c1_form:
415
  st.markdown("### 👨‍💼 Lead Info")
416
  bot_name = st.text_input("Ваше ім'я (Менеджера)", "Олексій")
417
  name = st.text_input("Ім'я Клієнта", "Олександр")
 
421
  if st.checkbox("🔍 Перевірити в базі"):
422
  pass
423
 
424
+ with c2_form:
425
+ st.markdown("### 📦 Product / Service Info (Editable)")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  p_name = st.text_input("Product Name", value=st.session_state.product_info.get("product_name", ""))
427
  p_value = st.text_input("Main Benefit (Value)", value=st.session_state.product_info.get("product_value", ""))
428
  p_price = st.text_input("Price / Pricing Model", value=st.session_state.product_info.get("product_price", ""))