updated run and readme

This commit is contained in:
tcsenpai 2024-10-23 18:50:08 +02:00
parent 7468450648
commit 4ce464c03f
6 changed files with 30 additions and 8 deletions

View File

@ -1,4 +1,6 @@
# OLLAMA Wikipedia-like Interface
# Llamapedia
![Llamapedia](./res/screenshot.png)
This Streamlit app provides a Wikipedia-like interface for querying an OLLAMA language model. Users can input their queries, and the app will generate informative responses using the configured OLLAMA model.
@ -9,7 +11,7 @@ This Streamlit app provides a Wikipedia-like interface for querying an OLLAMA la
pip install -r requirements.txt
```
2. Configure the `.env` file with your OLLAMA API URL and model name.
2. Configure the `.env` file with your OLLAMA API URL and model name (copy the `env.example` file to `.env` and modify it).
3. Run the Streamlit app:
```
@ -18,6 +20,10 @@ This Streamlit app provides a Wikipedia-like interface for querying an OLLAMA la
4. Open your web browser and navigate to the URL provided by Streamlit (usually `http://localhost:8501`).
## Tips
- You can use the `llamapedia.desktop` or `llamapedia.bat` files to run the app. This provides a terminal window for the app and an easy way to launch it with a double-click.
## Usage
1. Enter your query in the text area provided.

7
llamapedia.bat Normal file
View File

@ -0,0 +1,7 @@
@echo off
cd /d "%~dp0"
cd ..
streamlit run src/main.py
echo.
echo Press any key to close this window...
pause >nul

9
llamapedia.desktop Executable file
View File

@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Llamapedia
Comment=Your friendly llama-themed encyclopedia
Exec=bash -c 'cd "$(dirname "%k")/" && pwd && streamlit run src/main.py; echo "Press Enter to close this window..."; read'
Icon=icon.png
Terminal=true
Categories=Education;Reference;

BIN
res/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 KiB

View File

@ -3,7 +3,7 @@ from ui import render_wiki_interface, display_response
from ollama_service import chat_with_ollama
def main():
st.set_page_config(page_title="OLLAMA Wikipedia", page_icon="📚", layout="wide")
st.set_page_config(page_title="Llamapedia", page_icon="📚", layout="wide")
user_query = render_wiki_interface()

View File

@ -70,13 +70,13 @@ def render_wiki_interface():
top_bar = st.container()
with top_bar:
# Center the OLLAMA Wikipedia banner
# Center the Llamapedia banner
st.markdown(
"<h1 style='text-align: center;'>OLLAMA Wikipedia</h1>",
"<h1 style='text-align: center;'>Llamapedia</h1>",
unsafe_allow_html=True,
)
user_query = st.text_input("", placeholder="Search OLLAMA Wikipedia")
user_query = st.text_input("", placeholder="Search Llamapedia")
search_button = st.button("Search")
@ -93,10 +93,10 @@ def render_wiki_interface():
def display_intro():
st.title("Welcome to OLLAMA Wikipedia")
st.title("Welcome to Llamapedia")
st.markdown(
"""
OLLAMA Wikipedia is an AI-powered encyclopedia that generates informative articles on a wide range of topics.
Llamapedia is an AI-powered encyclopedia that generates informative articles on a wide range of topics.
To get started:
1. Enter a topic or question in the search bar at the top.