Spaces:
Paused
Paused
Ali Mohsin
commited on
Commit
·
3be6273
1
Parent(s):
c03608f
more stuff
Browse files
app.py
CHANGED
|
@@ -4,10 +4,9 @@ import json
|
|
| 4 |
import os
|
| 5 |
|
| 6 |
# Initialize the client
|
| 7 |
-
#
|
| 8 |
-
# If that fails, we can fallback to others, but let's start strong.
|
| 9 |
token = os.getenv("HUGGING_FACE_HUB_TOKEN")
|
| 10 |
-
client = InferenceClient("
|
| 11 |
|
| 12 |
SYSTEM_PROMPT = """You are ModelForge, an elite AI Solutions Architect with deep expertise in MLOps, research-level machine learning, and software engineering.
|
| 13 |
|
|
@@ -88,7 +87,7 @@ def generate_solution(description):
|
|
| 88 |
]
|
| 89 |
|
| 90 |
try:
|
| 91 |
-
# Use chat_completion for conversational models
|
| 92 |
response = client.chat_completion(
|
| 93 |
messages,
|
| 94 |
max_tokens=2500,
|
|
@@ -118,7 +117,7 @@ demo = gr.Interface(
|
|
| 118 |
inputs=gr.Textbox(lines=5, placeholder="Describe your complex ML problem..."),
|
| 119 |
outputs=gr.JSON(label="Recommendations"),
|
| 120 |
title="ModelForge AI Backend v2",
|
| 121 |
-
description="Advanced ML Solutions Architect (Powered by
|
| 122 |
)
|
| 123 |
|
| 124 |
if __name__ == "__main__":
|
|
|
|
| 4 |
import os
|
| 5 |
|
| 6 |
# Initialize the client
|
| 7 |
+
# Switching to Qwen/Qwen2.5-72B-Instruct as requested. It is SOTA and supported for chat.
|
|
|
|
| 8 |
token = os.getenv("HUGGING_FACE_HUB_TOKEN")
|
| 9 |
+
client = InferenceClient("Qwen/Qwen2.5-72B-Instruct", token=token)
|
| 10 |
|
| 11 |
SYSTEM_PROMPT = """You are ModelForge, an elite AI Solutions Architect with deep expertise in MLOps, research-level machine learning, and software engineering.
|
| 12 |
|
|
|
|
| 87 |
]
|
| 88 |
|
| 89 |
try:
|
| 90 |
+
# Use chat_completion for conversational models
|
| 91 |
response = client.chat_completion(
|
| 92 |
messages,
|
| 93 |
max_tokens=2500,
|
|
|
|
| 117 |
inputs=gr.Textbox(lines=5, placeholder="Describe your complex ML problem..."),
|
| 118 |
outputs=gr.JSON(label="Recommendations"),
|
| 119 |
title="ModelForge AI Backend v2",
|
| 120 |
+
description="Advanced ML Solutions Architect (Powered by Qwen2.5-72B-Instruct)"
|
| 121 |
)
|
| 122 |
|
| 123 |
if __name__ == "__main__":
|