Spaces:
Runtime error
Runtime error
Add a slide with icons (merge PR #27 from barun-saha/visual)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- app.py+30-2
- bootstrap-icons-1.11.3/png128/0-circle.pngAdded
- bootstrap-icons-1.11.3/png128/1-circle.pngAdded
- bootstrap-icons-1.11.3/png128/123.pngAdded
- bootstrap-icons-1.11.3/png128/2-circle.pngAdded
- bootstrap-icons-1.11.3/png128/3-circle.pngAdded
- bootstrap-icons-1.11.3/png128/4-circle.pngAdded
- bootstrap-icons-1.11.3/png128/5-circle.pngAdded
- bootstrap-icons-1.11.3/png128/6-circle.pngAdded
- bootstrap-icons-1.11.3/png128/7-circle.pngAdded
- bootstrap-icons-1.11.3/png128/8-circle.pngAdded
- bootstrap-icons-1.11.3/png128/9-circle.pngAdded
- bootstrap-icons-1.11.3/png128/activity.pngAdded
- bootstrap-icons-1.11.3/png128/airplane.pngAdded
- bootstrap-icons-1.11.3/png128/alarm.pngAdded
- bootstrap-icons-1.11.3/png128/alphabet.pngAdded
- bootstrap-icons-1.11.3/png128/amazon.pngAdded
- bootstrap-icons-1.11.3/png128/android2.pngAdded
- bootstrap-icons-1.11.3/png128/apple.pngAdded
- bootstrap-icons-1.11.3/png128/archive.pngAdded
- bootstrap-icons-1.11.3/png128/award-fill.pngAdded
- bootstrap-icons-1.11.3/png128/award.pngAdded
- bootstrap-icons-1.11.3/png128/balloon.pngAdded
- bootstrap-icons-1.11.3/png128/ban.pngAdded
- bootstrap-icons-1.11.3/png128/bandaid.pngAdded
- bootstrap-icons-1.11.3/png128/bank.pngAdded
- bootstrap-icons-1.11.3/png128/bank2.pngAdded
- bootstrap-icons-1.11.3/png128/bar-chart-line.pngAdded
- bootstrap-icons-1.11.3/png128/basket.pngAdded
- bootstrap-icons-1.11.3/png128/battery-charging.pngAdded
- bootstrap-icons-1.11.3/png128/bell-slash.pngAdded
- bootstrap-icons-1.11.3/png128/bell.pngAdded
- bootstrap-icons-1.11.3/png128/bicycle.pngAdded
- bootstrap-icons-1.11.3/png128/bing.pngAdded
- bootstrap-icons-1.11.3/png128/binoculars.pngAdded
- bootstrap-icons-1.11.3/png128/bluetooth.pngAdded
- bootstrap-icons-1.11.3/png128/book.pngAdded
- bootstrap-icons-1.11.3/png128/bookmark.pngAdded
- bootstrap-icons-1.11.3/png128/bootstrap.pngAdded
- bootstrap-icons-1.11.3/png128/briefcase.pngAdded
- bootstrap-icons-1.11.3/png128/broadcast-pin.pngAdded
- bootstrap-icons-1.11.3/png128/browser-chrome.pngAdded
- bootstrap-icons-1.11.3/png128/browser-edge.pngAdded
- bootstrap-icons-1.11.3/png128/browser-firefox.pngAdded
- bootstrap-icons-1.11.3/png128/browser-safari.pngAdded
- bootstrap-icons-1.11.3/png128/brush.pngAdded
- bootstrap-icons-1.11.3/png128/bucket.pngAdded
- bootstrap-icons-1.11.3/png128/bug-fill.pngAdded
- bootstrap-icons-1.11.3/png128/bug.pngAdded
- bootstrap-icons-1.11.3/png128/building.pngAdded
2 unmodified lines34567841 unmodified lines505152535455565758110 unmodified lines16917017117217317417517617717817918018122 unmodified lines2042052062072082092102 unmodified lines"""import datetimeimport loggingimport pathlibimport randomimport tempfile41 unmodified lines@st.cache_resourcedef _get_llm():return llm_helper.get_hf_endpoint()APP_TEXT = _load_strings()# Session variables110 unmodified linesformatted_template = prompt_template.format(**{'instructions': list_of_msgs,'previous_content': _get_last_response()})else:formatted_template = prompt_template.format(**{'question': prompt,})22 unmodified lineslogger.debug('Cleaned JSON: %s', response_cleaned)# Now create the PPT fileprogress_bar.progress(0.95, text='Searching photos and generating the slide deck...')path = generate_slide_deck(response_cleaned)progress_bar.progress(1.0, text='Done!')2 unmodified lines345678941 unmodified lines51525354555657585960616263646566676869707172737475767778798081110 unmodified lines19219319419519619719819920020120220320420520622 unmodified lines2292302312322332342352362372382 unmodified lines"""import datetimeimport loggingimport osimport pathlibimport randomimport tempfile41 unmodified lines@st.cache_resourcedef _get_llm():"""Get an LLM instance.:return: The LLM."""return llm_helper.get_hf_endpoint()@st.cache_datadef _get_icons_list() -> List[str]:"""Get a list of available icons names without the dir name and file extension.:return: A llist of the icons."""items = pathlib.Path(GlobalConfig.ICONS_DIR).glob('*.png')items = [os.path.basename(str(item)).removesuffix('.png') for item in items]return itemsAPP_TEXT = _load_strings()# Session variables110 unmodified linesformatted_template = prompt_template.format(**{'instructions': list_of_msgs,'previous_content': _get_last_response(),'icons_list': '\n'.join(_get_icons_list())})else:formatted_template = prompt_template.format(**{'question': prompt,'icons_list': '\n'.join(_get_icons_list())})22 unmodified lineslogger.debug('Cleaned JSON: %s', response_cleaned)# Now create the PPT fileprogress_bar.progress(GlobalConfig.LLM_PROGRESS_MAX,text='Finding photos online and generating the slide deck...')path = generate_slide_deck(response_cleaned)progress_bar.progress(1.0, text='Done!')
app.py+30-2
bootstrap-icons-1.11.3/png128/0-circle.pngAdded
bootstrap-icons-1.11.3/png128/1-circle.pngAdded
bootstrap-icons-1.11.3/png128/123.pngAdded
bootstrap-icons-1.11.3/png128/2-circle.pngAdded
bootstrap-icons-1.11.3/png128/3-circle.pngAdded
bootstrap-icons-1.11.3/png128/4-circle.pngAdded
bootstrap-icons-1.11.3/png128/5-circle.pngAdded
bootstrap-icons-1.11.3/png128/6-circle.pngAdded
bootstrap-icons-1.11.3/png128/7-circle.pngAdded
bootstrap-icons-1.11.3/png128/8-circle.pngAdded
bootstrap-icons-1.11.3/png128/9-circle.pngAdded
bootstrap-icons-1.11.3/png128/activity.pngAdded
bootstrap-icons-1.11.3/png128/airplane.pngAdded
bootstrap-icons-1.11.3/png128/alarm.pngAdded
bootstrap-icons-1.11.3/png128/alphabet.pngAdded
bootstrap-icons-1.11.3/png128/amazon.pngAdded
bootstrap-icons-1.11.3/png128/android2.pngAdded
bootstrap-icons-1.11.3/png128/apple.pngAdded
bootstrap-icons-1.11.3/png128/archive.pngAdded
bootstrap-icons-1.11.3/png128/award-fill.pngAdded
bootstrap-icons-1.11.3/png128/award.pngAdded
bootstrap-icons-1.11.3/png128/balloon.pngAdded
bootstrap-icons-1.11.3/png128/ban.pngAdded
bootstrap-icons-1.11.3/png128/bandaid.pngAdded
bootstrap-icons-1.11.3/png128/bank.pngAdded
bootstrap-icons-1.11.3/png128/bank2.pngAdded
bootstrap-icons-1.11.3/png128/bar-chart-line.pngAdded
bootstrap-icons-1.11.3/png128/basket.pngAdded
bootstrap-icons-1.11.3/png128/battery-charging.pngAdded
bootstrap-icons-1.11.3/png128/bell-slash.pngAdded
bootstrap-icons-1.11.3/png128/bell.pngAdded
bootstrap-icons-1.11.3/png128/bicycle.pngAdded
bootstrap-icons-1.11.3/png128/bing.pngAdded
bootstrap-icons-1.11.3/png128/binoculars.pngAdded
bootstrap-icons-1.11.3/png128/bluetooth.pngAdded
bootstrap-icons-1.11.3/png128/book.pngAdded
bootstrap-icons-1.11.3/png128/bookmark.pngAdded
bootstrap-icons-1.11.3/png128/bootstrap.pngAdded
bootstrap-icons-1.11.3/png128/briefcase.pngAdded
bootstrap-icons-1.11.3/png128/broadcast-pin.pngAdded
bootstrap-icons-1.11.3/png128/browser-chrome.pngAdded
bootstrap-icons-1.11.3/png128/browser-edge.pngAdded
bootstrap-icons-1.11.3/png128/browser-firefox.pngAdded
bootstrap-icons-1.11.3/png128/browser-safari.pngAdded
bootstrap-icons-1.11.3/png128/brush.pngAdded
bootstrap-icons-1.11.3/png128/bucket.pngAdded
bootstrap-icons-1.11.3/png128/bug-fill.pngAdded
bootstrap-icons-1.11.3/png128/bug.pngAdded
bootstrap-icons-1.11.3/png128/building.pngAdded