{"id":21510553,"url":"https://github.com/elkronos/llm_py","last_synced_at":"2026-05-07T21:36:57.724Z","repository":{"id":211765099,"uuid":"729903946","full_name":"elkronos/llm_py","owner":"elkronos","description":"Examples of large language model applications using streamlit and Haystack, Hugging Face, and LangChain.","archived":false,"fork":false,"pushed_at":"2023-12-10T21:02:38.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-24T01:36:49.349Z","etag":null,"topics":["haystack","huggingface","langchain","large-language-models","llm","python","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elkronos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-10T17:53:20.000Z","updated_at":"2024-06-18T21:08:15.000Z","dependencies_parsed_at":"2023-12-10T18:48:08.267Z","dependency_job_id":null,"html_url":"https://github.com/elkronos/llm_py","commit_stats":null,"previous_names":["elkronos/llm_py"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkronos%2Fllm_py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkronos%2Fllm_py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkronos%2Fllm_py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkronos%2Fllm_py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elkronos","download_url":"https://codeload.github.com/elkronos/llm_py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056428,"owners_count":20390720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["haystack","huggingface","langchain","large-language-models","llm","python","streamlit"],"created_at":"2024-11-23T21:49:21.663Z","updated_at":"2026-05-07T21:36:57.678Z","avatar_url":"https://github.com/elkronos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# llm_py\n Examples of large language model applications using streamlit and Haystack, Hugging Face, and LangChain.\n\n## Haystack\n\n### `DocuSeeker.py` - Advanced Document Search Application with Haystack\n- **Elasticsearch Integration:** Manages and queries documents.\n- **Redis Caching:** Efficient data retrieval.\n- **Streamlit UI:** User-friendly search interface.\n- **OpenAI GPT-4 Enhancement:** Improves search query results.\n- **Asynchronous Operations:** Enhances performance with asynchronous searches.\n### Usage\n- **DocuSeeker.py:** Users input search queries and receive relevant document results.\n\n### `FAQPipeline.py` (Streamlit-based Question Answering Application; using COVID-19 data as an example)\n- **Elasticsearch Document Store:** Efficient storage and retrieval of FAQ data.\n- **Embedding Retriever with MiniLM:** Utilizes sentence-transformers for semantic search.\n- **Streamlit Interface:** Interactive web app for querying COVID-19 FAQs.\n- **FAQ Pipeline:** Integrates retriever with Streamlit for real-time answers.\n- **Error Handling:** Robust user input validation and error management.\n### Usage\n- **COVID-19 FAQ Bot:** Users can ask questions about COVID-19 and get instant answers.\n\n  ### `SimpleSearcher.py` - Document Search Application with Haystack\n- **Document Upload:** Upload multiple documents to a Haystack instance for indexing.\n- **Document Search:** Search for documents using a user-provided query.\n- **Error Handling:** Handles potential errors during document upload and search operations.\n- **User-Friendly Display:** Displays search results in a readable format.\n- **Streamlit Interface:** Utilizes Streamlit for a user-friendly web interface.\n### Usage\n- **Document Upload:** Users can upload documents for indexing by selecting files and clicking the \"Upload Files\" button. Uploaded documents are processed, and results (success or error) are displayed.\n- **Document Search:** Users can enter a search query in the text input field and click the \"Search\" button to retrieve relevant documents. Results are displayed with document IDs, content excerpts, and scores.\n- **Error Handling:** In case of errors during document upload or search, appropriate error messages are shown.\n- **Streamlit Interface:** The application provides a Streamlit-based web interface for easy interaction.\n\n\n## Hugging face\n\n### `HuggingFaceExplorer.py` - Hugging Face Model Management Tool\n- **Leaderboard Access:** Retrieves top models based on downloads from Hugging Face.\n- **Dynamic Filtering and Sorting:** Customizable sorting and filtering of model data.\n- **Model Download:** Direct download functionality for specific Hugging Face models.\n- **Search Integration:** Ability to search for models based on specific criteria.\n- **Robust Error Handling:** Catches and handles potential errors efficiently.\n### Usage\n- **ModelManager:** Users can view, filter, sort, download, and search for AI models from Hugging Face's expansive library.\n\n### `TranslationAssistant.py` - (Real-time Language Translation Tool)\n- **Translation Pipeline:** Helsinki-NLP models from Hugging Face.\n- **Streamlit Interface:** Intuitive UI for language selection and text input.\n- **Multi-language Support:** Translates between languages like English, Spanish, French, etc.\n- **Real-time Translation:** Instant text translation with status feedback.\n- **Error Handling:** Logs translation failures.\n- **Feedback Mechanism:** User input and suggestions.\n- **Session Management:** Tracks user interactions.\n### Usage\n- **TranslationAssistant.py:** Users select languages, input text, and receive translations.\n\n\n## LangChain\n\n### `VirtualAssistant.py` (Advanced Virtual Assistant)\n- **LangChain Integration:** Generates contextual responses.\n- **OpenAI API Key Management:** Secure API key access.\n- **Dynamic Context Handling:** Session-based context history.\n- **Input Sanitization:** Ensures security of user inputs.\n- **Streamlit Interface:** User-friendly front-end for queries and responses.\n- **Error Logging:** Troubleshooting and application integrity.\n### Usage\n- **VirtualAssistant.py:** Users input queries, receive contextual responses, and manage session history.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felkronos%2Fllm_py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felkronos%2Fllm_py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felkronos%2Fllm_py/lists"}