Spaces:
Sleeping
Sleeping
File size: 474 Bytes
0e7a242 98c79da 106bd32 5b4edca 106bd32 5b4edca 106bd32 726db7e 106bd32 726db7e 106bd32 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import gradio as gr
import os
from openai import OpenAI
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
def check_compliance(text):
response = client.responses.create(
model="gpt-4.1-nano",
input=text,
temperature=0.1
)
return response.output[0].content[0].text
gr.Interface(
fn=check_compliance,
inputs=gr.Textbox(lines=15, label="Enter Proposal"),
outputs=gr.Textbox(lines=15, label="Compliance Result"),
).launch()
|