mirror of
https://github.com/tcsenpai/llamapedia.git
synced 2025-06-06 02:55:22 +00:00
updated run and readme
This commit is contained in:
parent
7468450648
commit
4ce464c03f
10
README.md
10
README.md
@ -1,4 +1,6 @@
|
|||||||
# OLLAMA Wikipedia-like Interface
|
# Llamapedia
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
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.
|
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
|
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:
|
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`).
|
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
|
## Usage
|
||||||
|
|
||||||
1. Enter your query in the text area provided.
|
1. Enter your query in the text area provided.
|
||||||
|
7
llamapedia.bat
Normal file
7
llamapedia.bat
Normal 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
9
llamapedia.desktop
Executable 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
BIN
res/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 326 KiB |
@ -3,7 +3,7 @@ from ui import render_wiki_interface, display_response
|
|||||||
from ollama_service import chat_with_ollama
|
from ollama_service import chat_with_ollama
|
||||||
|
|
||||||
def main():
|
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()
|
user_query = render_wiki_interface()
|
||||||
|
|
||||||
|
10
src/ui.py
10
src/ui.py
@ -70,13 +70,13 @@ def render_wiki_interface():
|
|||||||
top_bar = st.container()
|
top_bar = st.container()
|
||||||
|
|
||||||
with top_bar:
|
with top_bar:
|
||||||
# Center the OLLAMA Wikipedia banner
|
# Center the Llamapedia banner
|
||||||
st.markdown(
|
st.markdown(
|
||||||
"<h1 style='text-align: center;'>OLLAMA Wikipedia</h1>",
|
"<h1 style='text-align: center;'>Llamapedia</h1>",
|
||||||
unsafe_allow_html=True,
|
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")
|
search_button = st.button("Search")
|
||||||
|
|
||||||
@ -93,10 +93,10 @@ def render_wiki_interface():
|
|||||||
|
|
||||||
|
|
||||||
def display_intro():
|
def display_intro():
|
||||||
st.title("Welcome to OLLAMA Wikipedia")
|
st.title("Welcome to Llamapedia")
|
||||||
st.markdown(
|
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:
|
To get started:
|
||||||
|
|
||||||
1. Enter a topic or question in the search bar at the top.
|
1. Enter a topic or question in the search bar at the top.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user