File size: 1,175 Bytes
f1e5182
68b28eb
f1e5182
 
 
 
 
 
 
 
 
 
 
 
 
68b28eb
 
3bc2969
 
 
604ba4f
3bc2969
f685914
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3bc2969
604ba4f
3bc2969
604ba4f
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import streamlit as st 
import time

# Animated text function
def animated_text(text, speed=0.05):
    placeholder = st.empty()
    displayed_text = ""
    for letter in text:
        displayed_text += letter
        placeholder.markdown(f"""
            <h1 style="text-align:center; color: #FF4500;">{displayed_text} πŸš€</h1>
        """, unsafe_allow_html=True)  # Corrected f-string formatting
        time.sleep(speed)

# Display animated text
animated_text("Welcome to GenAI App - AI Code Reviewer!", speed=0.1)

import google.generativeai as genai
st.header('πŸš€ AI-Powered Code Debugging πŸ”: ')

st.subheader('🐞 Buggy Code::')
st.write('Enter your code here:')

# Text Area for User Input
code = st.text_area("Paste your code here:", height=200)

# Display the Code with Syntax Highlighting
if code:
    st.code(code, language="python")  # Adjust language as needed

    # Copy Code Button
    st.markdown(
        f"""
        <button onclick="navigator.clipboard.writeText(`{code}`)">Debug Code</button>
        """,
        unsafe_allow_html=True
    )


st.subheader('πŸ” Bug Found in:')

st.subheader('βœ… Fixed Code:')

st.subheader('πŸ’‘ Suggestion:')