Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,8 @@ from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
|
|
6 |
import black
|
7 |
from pylint import lint
|
8 |
from io import StringIO
|
9 |
-
import
|
10 |
-
|
11 |
-
# Set your OpenAI API key here
|
12 |
-
openai.api_key = "YOUR_OPENAI_API_KEY"
|
13 |
|
14 |
HUGGING_FACE_REPO_URL = "https://huggingface.co/spaces/acecalisto3/DevToolKit"
|
15 |
PROJECT_ROOT = "projects"
|
@@ -95,8 +93,8 @@ def chat_interface_with_agent(input_text, agent_name):
|
|
95 |
# Load the GPT-2 model which is compatible with AutoModelForCausalLM
|
96 |
model_name = "gpt2"
|
97 |
try:
|
98 |
-
model =
|
99 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
100 |
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
101 |
except EnvironmentError as e:
|
102 |
return f"Error loading model: {e}"
|
|
|
6 |
import black
|
7 |
from pylint import lint
|
8 |
from io import StringIO
|
9 |
+
from transformers import AutoModel
|
10 |
+
model = AutoModel.from_pretrained("InferenceIllusionist/Meta-Llama-3.1-8B-Claude-iMat-GGUF")
|
|
|
|
|
11 |
|
12 |
HUGGING_FACE_REPO_URL = "https://huggingface.co/spaces/acecalisto3/DevToolKit"
|
13 |
PROJECT_ROOT = "projects"
|
|
|
93 |
# Load the GPT-2 model which is compatible with AutoModelForCausalLM
|
94 |
model_name = "gpt2"
|
95 |
try:
|
96 |
+
model = AutoModel.from_pretrained("InferenceIllusionist/Meta-Llama-3.1-8B-Claude-iMat-GGUF")
|
97 |
+
tokenizer = AutoTokenizer.from_pretrained("InferenceIllusionist/Meta-Llama-3.1-8B-Claude-iMat-GGUF")
|
98 |
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
99 |
except EnvironmentError as e:
|
100 |
return f"Error loading model: {e}"
|