siddhantuniyal's picture
Update app.py
c4a9cbc
raw
history blame
410 Bytes
import google.generativeai as genai
import gradio as gr
api_key = "AIzaSyCmmus8HFPLXskU170_FR4j2CQeWZBKGMY"
model = genai.GenerativeModel('gemini-pro')
genai.configure(api_key = api_key )
def get_response(input_text):
response = model.generate_content(input_text)
return response.text
iface = gr.Interface(
fn = get_response,
inputs = ["text"],
outputs = ["text"]
)
iface.launch()