|
import streamlit as st |
|
|
|
from PIL import Image |
|
from tool_loader import ToolLoader |
|
from app_user_desc import app_user_desc |
|
from app_dev_desc import app_dev_desc |
|
from logger import log_response |
|
from logger import log_enabled |
|
from app_chat import app_chat |
|
import numpy as np |
|
import re,sys,unicodedata |
|
import logging |
|
|
|
|
|
from app_agent_config import AgentConfig |
|
|
|
|
|
agent_config = AgentConfig() |
|
|
|
|
|
st.set_page_config( |
|
page_title="Custom Transformers can realy do anything...", |
|
page_icon="π", |
|
) |
|
|
|
|
|
def on_close(): |
|
print("The modal was closed!") |
|
|
|
|
|
def open_modal(): |
|
print("Todo") |
|
|
|
|
|
st.button("User Description", open_modal()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import pandas as pd |
|
from io import StringIO |
|
with st.sidebar: |
|
|
|
|
|
st.header("Set Tools and Option. ") |
|
|
|
with st.expander("Configure the agent and activate tools"): |
|
|
|
agent_config.configure() |
|
|
|
with st.expander("Set Content and Context"): |
|
|
|
agent_config.content_and_context() |
|
|
|
|
|
|
|
|
|
|
|
st.title("Hugging Face Agent and Tools") |
|
|
|
|
|
|
|
st.markdown("Welcome to the Hugging Face Agent and Tools app! This app allows you to interact with various tools using the Hugging Face Inference API. CustomTransformers can do anything \nπ€ͺπ€ππ€π€ͺ.") |
|
|
|
|
|
|
|
|
|
|
|
|
|
app_chat(agent_config) |