Update app.py
Browse files
app.py
CHANGED
|
@@ -153,6 +153,10 @@ if openai_api_key:
|
|
| 153 |
elif mode == "Code Generator":
|
| 154 |
st.header("Code Generator")
|
| 155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
# Code generation prompt input
|
| 157 |
code_prompt = st.text_area("Describe the code you want to generate:",
|
| 158 |
"e.g., Write a Python program that generates Fibonacci numbers.")
|
|
@@ -189,6 +193,10 @@ if openai_api_key:
|
|
| 189 |
elif mode == "AI Chatbot Tutor":
|
| 190 |
st.header("AI Chatbot Tutor")
|
| 191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
# Chat interface for the AI tutor
|
| 193 |
chat_history = []
|
| 194 |
|
|
@@ -233,6 +241,10 @@ if openai_api_key:
|
|
| 233 |
elif mode == "Code Bug Fixer":
|
| 234 |
st.header("Code Bug Fixer")
|
| 235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
# User input for buggy code
|
| 237 |
buggy_code = st.text_area("Enter your buggy code here:")
|
| 238 |
|
|
|
|
| 153 |
elif mode == "Code Generator":
|
| 154 |
st.header("Code Generator")
|
| 155 |
|
| 156 |
+
# Display image/logo in the "Course Query Assistant" section (optional)
|
| 157 |
+
codegen = Image.open("9802381.png") # Ensure the file is in the correct directory
|
| 158 |
+
st.image(codegen, width=150) # Adjust the size as per preference
|
| 159 |
+
|
| 160 |
# Code generation prompt input
|
| 161 |
code_prompt = st.text_area("Describe the code you want to generate:",
|
| 162 |
"e.g., Write a Python program that generates Fibonacci numbers.")
|
|
|
|
| 193 |
elif mode == "AI Chatbot Tutor":
|
| 194 |
st.header("AI Chatbot Tutor")
|
| 195 |
|
| 196 |
+
# Display image/logo in the "Course Query Assistant" section (optional)
|
| 197 |
+
aitut = Image.open("910372.png") # Ensure the file is in the correct directory
|
| 198 |
+
st.image(aitut, width=150) # Adjust the size as per preference
|
| 199 |
+
|
| 200 |
# Chat interface for the AI tutor
|
| 201 |
chat_history = []
|
| 202 |
|
|
|
|
| 241 |
elif mode == "Code Bug Fixer":
|
| 242 |
st.header("Code Bug Fixer")
|
| 243 |
|
| 244 |
+
# Display image/logo in the "Course Query Assistant" section (optional)
|
| 245 |
+
aibug = Image.open("bug.png") # Ensure the file is in the correct directory
|
| 246 |
+
st.image(aibug, width=150) # Adjust the size as per preference
|
| 247 |
+
|
| 248 |
# User input for buggy code
|
| 249 |
buggy_code = st.text_area("Enter your buggy code here:")
|
| 250 |
|