Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,9 +20,22 @@ st.header('π AI-Powered Code Debugging π: ')
|
|
| 20 |
|
| 21 |
st.subheader('π Buggy Code::')
|
| 22 |
st.write('Enter your code here:')
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
st.code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
st.subheader('π Bug Found in:')
|
| 28 |
|
|
|
|
| 20 |
|
| 21 |
st.subheader('π Buggy Code::')
|
| 22 |
st.write('Enter your code here:')
|
| 23 |
+
|
| 24 |
+
# Text Area for User Input
|
| 25 |
+
code = st.text_area("Paste your code here:", height=200)
|
| 26 |
+
|
| 27 |
+
# Display the Code with Syntax Highlighting
|
| 28 |
+
if code:
|
| 29 |
+
st.code(code, language="python") # Adjust language as needed
|
| 30 |
+
|
| 31 |
+
# Copy Code Button
|
| 32 |
+
st.markdown(
|
| 33 |
+
f"""
|
| 34 |
+
<button onclick="navigator.clipboard.writeText(`{code}`)">Debug Code</button>
|
| 35 |
+
""",
|
| 36 |
+
unsafe_allow_html=True
|
| 37 |
+
)
|
| 38 |
+
|
| 39 |
|
| 40 |
st.subheader('π Bug Found in:')
|
| 41 |
|