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() |