-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoboTF_LLM_Tools.py
More file actions
76 lines (64 loc) · 3.44 KB
/
RoboTF_LLM_Tools.py
File metadata and controls
76 lines (64 loc) · 3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import streamlit as st
from PIL import Image
def get_server_ip():
host = st.context.headers.get("host", None)
if host:
return host.split(':')[0] # Remove port if present
# Fallback to local IP
try:
return socket.gethostbyname(socket.gethostname())
except Exception:
return 'localhost'
def main():
# Streamlit UI setup
st.set_page_config(layout="wide")
st.title("RoboTF LLM Tools for LocalAI usage!")
st.logo("images/robotf-small.png", size="large", icon_image="images/robotf-small.png")
try:
image = Image.open("images/robotf-tools.jpg")
st.image(image, width=300, caption="RoboTF LLM Tools")
except FileNotFoundError as e:
st.error(f"The image file 'robot-tools.jpg' was not found: {e}")
except Exception as e:
st.error(f"Failed to load image: {e}")
st.write("What does this suite of tools do so far:")
st.write(" * Docker Command Runner")
st.write(" * Docker Dashboard")
st.write(" * HuggingFace Downloader")
st.write(" * LLM Token Estimator for open source models")
st.write(" * Model Config Editor for LocalAI")
st.write("Choose your selection from the left hand menu")
st.write("Other Application Links in RoboTF AI Suite (must be running)")
server_ip = get_server_ip()
application_links = f"""
[LocalAI](http://{server_ip}:8080) |
[ComfyUI](http://{server_ip}:8188) |
[Open WebUI](http://{server_ip}:3000) |
[Flowise](http://{server_ip}:3001) |
[n8n](http://{server_ip}:5678) |
[Postgres](http://{server_ip}:5432) |
[ChromaDB](http://{server_ip}:8000) |
[Unstructured API](http://{server_ip}:8003)
"""
st.markdown(application_links.replace('\n', ' '), unsafe_allow_html=True)
st.divider()
# Social Media Icons and Links
social_media_links = """
[](https://www.youtube.com/@RoboTFAI)
[](https://www.reddit.com/user/RoboTF-AI/)
[](https://github.com/kkacsh321)
[](https://www.buymeacoffee.com/RoboTF)
[](https://x.com/RoboTF_AI)
[](mailto:robot@robotf.ai)
[](https://robotf.ai)
"""
st.markdown(social_media_links.replace('\n', ' '), unsafe_allow_html=True)
# Use Local CSS File
def local_css(file_name):
with open(file_name) as f:
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
local_css("custom_configs/style.css")
# Add footer with copyright information
st.write("Copyright © 2025 RoboTF.ai. All Rights Reserved.")
if __name__ == "__main__":
main()