RozzaCreat commited on
Commit
b6d780b
·
verified ·
1 Parent(s): 0e1963c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +75 -75
app.py CHANGED
@@ -409,96 +409,96 @@ def create_shabbat_interface():
409
 
410
  👆 **Enter your city name above and click 'Get Shabbat Times'**
411
 
412
- Or click one of the popular cities below for a quick search.
413
 
414
- ### 🇮🇱 **Common Israeli Cities:**
415
- Use any of these city names: Jerusalem, Tel Aviv, Haifa, Beer Sheva, Netanya, Ashdod
416
 
417
- ### 🌍 **International Cities:**
418
- Include country name: London, UK • Paris, France • New York, USA
419
 
420
- ---
421
 
422
- **🕯️ Every Friday evening, Jewish families around the world light candles to welcome Shabbat**
423
- """
424
- )
425
 
426
- # Example buttons for popular cities
427
- gr.Markdown("### 🌍 Quick Search - Popular Cities:")
428
 
429
- with gr.Row():
430
- # Israeli cities first for the detected user
431
- popular_cities = [
432
- "Jerusalem, Israel",
433
- "Tel Aviv, Israel",
434
- "Haifa, Israel",
435
- "Beer Sheva, Israel",
436
- "Netanya, Israel",
437
- "Ashdod, Israel",
438
- # International cities
439
- "New York, NY",
440
- "London, UK",
441
- "Paris, France",
442
- "Toronto, Canada",
443
- "Los Angeles, CA",
444
- "Miami, FL"
445
- ]
446
 
447
- example_btns = []
448
- for i in range(0, len(popular_cities), 4):
449
- with gr.Row():
450
- for city in popular_cities[i:i+4]:
451
- btn = gr.Button(f"📍 {city}", size="sm")
452
- example_btns.append((btn, city))
453
 
454
- # Button click handlers
455
- search_btn.click(
456
- fn=agent.get_shabbat_times,
457
- inputs=[city_input],
458
- outputs=output_area
459
- )
460
 
461
- # Example button handlers
462
- for btn, city in example_btns:
463
- btn.click(
464
- fn=lambda c=city: agent.get_shabbat_times(c),
465
- outputs=output_area
466
- )
467
 
468
- # Resources and information
469
- with gr.Accordion("📚 Resources & Information", open=False):
470
- gr.Markdown("""
471
- ### 🕯️ **About Shabbat Candle Lighting:**
472
 
473
- **Candle Lighting Time:**
474
- - Performed on Friday evening before sunset
475
- - Typically 18 minutes before sunset (varies by community)
476
- - Marks the beginning of Shabbat
477
- - Usually done by the woman of the house
478
 
479
- **Havdalah Time:**
480
- - Performed on Saturday evening after sunset
481
- - When three medium-sized stars are visible in the sky
482
- - Marks the end of Shabbat
483
- - Includes blessings over wine, spices, and candle
484
 
485
- ### 🌐 **Data Sources:**
486
- - **Primary:** [Chabad.org](https://www.chabad.org/calendar/candlelighting_cdo/aid/6226/jewish/Accurate-Shabbat-Candle-Lighting-Times.htm)
487
- - **Backup:** Hebcal.com and other Jewish calendar sites
488
- - **Method:** Intelligent web scraping with multiple fallback strategies
489
 
490
- ### ⚠️ **Important Disclaimers:**
491
- - Always consult your local rabbi for specific customs
492
- - Times may vary based on local Jewish community practices
493
- - This tool is for reference only - not a substitute for religious guidance
494
- - Some communities light candles at different intervals before sunset
495
 
496
- ### 🔧 **Technical Features:**
497
- - Multiple search strategies for maximum success on Chabad.org
498
- - Intelligent pattern matching to extract candle lighting times
499
- - Fallback to alternative Jewish calendar sources if needed
500
- - Manual city input for maximum accuracy and reliability
501
- """)
502
 
503
  gr.Markdown("""
504
  ---
 
409
 
410
  👆 **Enter your city name above and click 'Get Shabbat Times'**
411
 
412
+ # Or click one of the popular cities below for a quick search.
413
 
414
+ # ### 🇮🇱 **Common Israeli Cities:**
415
+ # Use any of these city names: Jerusalem, Tel Aviv, Haifa, Beer Sheva, Netanya, Ashdod
416
 
417
+ # ### 🌍 **International Cities:**
418
+ # Include country name: London, UK • Paris, France • New York, USA
419
 
420
+ # ---
421
 
422
+ # **🕯️ Every Friday evening, Jewish families around the world light candles to welcome Shabbat**
423
+ # """
424
+ # )
425
 
426
+ # # Example buttons for popular cities
427
+ # gr.Markdown("### 🌍 Quick Search - Popular Cities:")
428
 
429
+ # with gr.Row():
430
+ # # Israeli cities first for the detected user
431
+ # popular_cities = [
432
+ # "Jerusalem, Israel",
433
+ # "Tel Aviv, Israel",
434
+ # "Haifa, Israel",
435
+ # "Beer Sheva, Israel",
436
+ # "Netanya, Israel",
437
+ # "Ashdod, Israel",
438
+ # # International cities
439
+ # "New York, NY",
440
+ # "London, UK",
441
+ # "Paris, France",
442
+ # "Toronto, Canada",
443
+ # "Los Angeles, CA",
444
+ # "Miami, FL"
445
+ # ]
446
 
447
+ # example_btns = []
448
+ # for i in range(0, len(popular_cities), 4):
449
+ # with gr.Row():
450
+ # for city in popular_cities[i:i+4]:
451
+ # btn = gr.Button(f"📍 {city}", size="sm")
452
+ # example_btns.append((btn, city))
453
 
454
+ # # Button click handlers
455
+ # search_btn.click(
456
+ # fn=agent.get_shabbat_times,
457
+ # inputs=[city_input],
458
+ # outputs=output_area
459
+ # )
460
 
461
+ # # Example button handlers
462
+ # for btn, city in example_btns:
463
+ # btn.click(
464
+ # fn=lambda c=city: agent.get_shabbat_times(c),
465
+ # outputs=output_area
466
+ # )
467
 
468
+ # # Resources and information
469
+ # with gr.Accordion("📚 Resources & Information", open=False):
470
+ # gr.Markdown("""
471
+ # ### 🕯️ **About Shabbat Candle Lighting:**
472
 
473
+ # **Candle Lighting Time:**
474
+ # - Performed on Friday evening before sunset
475
+ # - Typically 18 minutes before sunset (varies by community)
476
+ # - Marks the beginning of Shabbat
477
+ # - Usually done by the woman of the house
478
 
479
+ # **Havdalah Time:**
480
+ # - Performed on Saturday evening after sunset
481
+ # - When three medium-sized stars are visible in the sky
482
+ # - Marks the end of Shabbat
483
+ # - Includes blessings over wine, spices, and candle
484
 
485
+ # ### 🌐 **Data Sources:**
486
+ # - **Primary:** [Chabad.org](https://www.chabad.org/calendar/candlelighting_cdo/aid/6226/jewish/Accurate-Shabbat-Candle-Lighting-Times.htm)
487
+ # - **Backup:** Hebcal.com and other Jewish calendar sites
488
+ # - **Method:** Intelligent web scraping with multiple fallback strategies
489
 
490
+ # ### ⚠️ **Important Disclaimers:**
491
+ # - Always consult your local rabbi for specific customs
492
+ # - Times may vary based on local Jewish community practices
493
+ # - This tool is for reference only - not a substitute for religious guidance
494
+ # - Some communities light candles at different intervals before sunset
495
 
496
+ # ### 🔧 **Technical Features:**
497
+ # - Multiple search strategies for maximum success on Chabad.org
498
+ # - Intelligent pattern matching to extract candle lighting times
499
+ # - Fallback to alternative Jewish calendar sources if needed
500
+ # - Manual city input for maximum accuracy and reliability
501
+ # """)
502
 
503
  gr.Markdown("""
504
  ---