Update app.py
Browse files
app.py
CHANGED
|
@@ -9,10 +9,10 @@ from openai import OpenAI
|
|
| 9 |
# =========================
|
| 10 |
# CONFIGURATION
|
| 11 |
# =========================
|
| 12 |
-
GROQ_API_KEY = os.getenv("Groq_api")
|
| 13 |
|
| 14 |
if not GROQ_API_KEY:
|
| 15 |
-
raise ValueError("Please set
|
| 16 |
|
| 17 |
client = OpenAI(
|
| 18 |
api_key=GROQ_API_KEY,
|
|
@@ -160,7 +160,7 @@ Portfolio Links:
|
|
| 160 |
# =========================
|
| 161 |
# GRADIO UI
|
| 162 |
# =========================
|
| 163 |
-
with gr.Blocks(
|
| 164 |
gr.Markdown("""
|
| 165 |
# π AI Proposal Generator
|
| 166 |
### Generate high-converting freelance proposals in seconds
|
|
@@ -227,4 +227,9 @@ with gr.Blocks(theme=gr.themes.Soft(), title="AI Proposal Generator") as demo:
|
|
| 227 |
# LAUNCH
|
| 228 |
# =========================
|
| 229 |
if __name__ == "__main__":
|
| 230 |
-
demo.launch(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# =========================
|
| 10 |
# CONFIGURATION
|
| 11 |
# =========================
|
| 12 |
+
GROQ_API_KEY = os.getenv("Groq_api") # β
Matches your Hugging Face secret name
|
| 13 |
|
| 14 |
if not GROQ_API_KEY:
|
| 15 |
+
raise ValueError("Please set Groq_api environment variable in Hugging Face Secrets")
|
| 16 |
|
| 17 |
client = OpenAI(
|
| 18 |
api_key=GROQ_API_KEY,
|
|
|
|
| 160 |
# =========================
|
| 161 |
# GRADIO UI
|
| 162 |
# =========================
|
| 163 |
+
with gr.Blocks(title="AI Proposal Generator") as demo:
|
| 164 |
gr.Markdown("""
|
| 165 |
# π AI Proposal Generator
|
| 166 |
### Generate high-converting freelance proposals in seconds
|
|
|
|
| 227 |
# LAUNCH
|
| 228 |
# =========================
|
| 229 |
if __name__ == "__main__":
|
| 230 |
+
demo.launch(
|
| 231 |
+
server_name="0.0.0.0",
|
| 232 |
+
server_port=7860,
|
| 233 |
+
theme=gr.themes.Soft(), # β
Theme moved to launch() for Gradio 6.0 compatibility
|
| 234 |
+
ssr_mode=False # β
Disable SSR to avoid experimental warning
|
| 235 |
+
)
|