-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
34 lines (17 loc) · 768 Bytes
/
app.py
File metadata and controls
34 lines (17 loc) · 768 Bytes
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
from openai import OpenAI
import google.generativeai as genai
import streamlit as st
f = open("open-ai-key.txt")
key = f.read()
genai.configure(api_key=key)
model=genai.GenerativeModel(
model_name="gemini-1.5-pro-latest",
system_instruction="You are a Developer who debug a python codes and give optmized version of code ")
st.header("GenAI App : Expert Python Code Debugger🧑💻")
st.text("Who helps you with your code journey")
st.subheader("Enter Your Python Codes and Fix the Bugs🥳")
prompt = st.text_area("Enter your python Code here :")
if st.button("DEBUG🐞") == True:
response = model.generate_content(prompt)
st.header("Review of Your Code🧐")
st.write(response.text)