Mpavan45 commited on
Commit
f685914
Β·
verified Β·
1 Parent(s): 9c2b33d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -3
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
- code1="""
24
- """
25
- st.code(code1, language='python')
 
 
 
 
 
 
 
 
 
 
 
 
 
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