eaglelandsonce's picture
Update app.py
65f700b
raw
history blame contribute delete
944 Bytes
import streamlit as st
import subprocess
import json
st.title('AutoGen Multi-Agent Python Programmer')
st.markdown('''To learn more join https://www.meetup.com/florence-aws-user-group-meetup/''')
api_key = st.text_input("Enter your Openai API Key:",type="password")
programming_problem = st.text_area("Enter your programming task:", "Write a program that calculates the number of a Hebrew word using the gematria, and write a test for יהוה which should be 26", height=100)
if st.button('Solve'):
if api_key and programming_problem:
input_data = {
"programming_problem": programming_problem,
"api_key": api_key
}
result = subprocess.check_output(
["python", "query_solver.py"],
input=json.dumps(input_data),
text=True
)
st.write(result.strip())
else:
st.write("Please provide both Open API key and programming problem.")