typesdigital's picture
Update app.py
c8012c7
raw
history blame contribute delete
426 Bytes
import gradio as gr
import interpreter
# Set your OpenAI API key
interpreter.api_key = "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"
# Define the chat function using the interpreter library
def chat(input_text):
response = interpreter.chat(input_text)
return response
# Create a Gradio interface
iface = gr.Interface(fn=chat, inputs="text", outputs="text", live=True)
# Launch the interface
iface.launch()