Spaces:
Sleeping
Sleeping
Pooja P
commited on
Commit
·
a9a4045
1
Parent(s):
c77b300
Pin openai to 0.28 for backward compatibility
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
from openai import OpenAI
|
2 |
|
3 |
client = OpenAI()
|
@@ -10,3 +11,8 @@ def generate_blog(prompt):
|
|
10 |
]
|
11 |
)
|
12 |
return response.choices[0].message.content
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
from openai import OpenAI
|
3 |
|
4 |
client = OpenAI()
|
|
|
11 |
]
|
12 |
)
|
13 |
return response.choices[0].message.content
|
14 |
+
|
15 |
+
iface = gr.Interface(fn=generate_blog, inputs="text", outputs="text")
|
16 |
+
|
17 |
+
# ✅ REQUIRED to run on Hugging Face
|
18 |
+
iface.launch()
|