rianders commited on
Commit
e243aad
·
verified ·
1 Parent(s): 3044832

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import streamlit as st
2
  from openai import OpenAI
3
  from dotenv import load_dotenv
4
-
5
  import requests
6
  import hashlib
7
  from crewai import Agent, Task, Crew
@@ -54,8 +54,32 @@ crew = Crew(
54
  )
55
 
56
  # Streamlit app setup
57
- st.title('CrewAI Streamlit Documentation Expert Control Panel')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
 
 
 
 
59
  # Manual update button
60
  if st.button('Check for Streamlit Documentation Updates Now'):
61
  # Trigger the Crew to perform the update task manually
 
1
  import streamlit as st
2
  from openai import OpenAI
3
  from dotenv import load_dotenv
4
+ import os
5
  import requests
6
  import hashlib
7
  from crewai import Agent, Task, Crew
 
54
  )
55
 
56
  # Streamlit app setup
57
+ # Initialize a list to store chat history
58
+ chat_history = []
59
+
60
+ # Streamlit app setup
61
+ st.title('CrewAI Streamlit Documentation Expert - Chat Interface')
62
+
63
+ # Chat input
64
+ user_input = st.text_input("Ask a question about Streamlit documentation:")
65
+
66
+ # When the user sends a question
67
+ if st.button('Send'):
68
+ # Append user query to chat history
69
+ chat_history.append(f"You: {user_input}")
70
+
71
+ # Process the query (basic implementation)
72
+ # Here you can add the logic to process the query and get a response
73
+ response = "This is a placeholder response." # Replace with actual response logic
74
+ chat_history.append(f"Agent: {response}")
75
+
76
+ # Clear the input field
77
+ user_input = ""
78
 
79
+ # Display chat history
80
+ for chat in chat_history:
81
+ st.text(chat)
82
+
83
  # Manual update button
84
  if st.button('Check for Streamlit Documentation Updates Now'):
85
  # Trigger the Crew to perform the update task manually