GPT-4 / app.py
NewUserID's picture
Create app.py
9997d5d verified
raw
history blame contribute delete
360 Bytes
from g4f.client import Client
import gradio as gr
def process(prompt):
client = Client()
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": prompt}]
)
return(response.choices[0].message.content)
iface = gr.Interface(fn=process, inputs="text", outputs="text")
iface.launch()