Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,10 +5,14 @@ from pptx import Presentation
|
|
| 5 |
from pptx.util import Inches, Pt
|
| 6 |
import os
|
| 7 |
import io
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
@st.cache_resource
|
| 10 |
def load_model():
|
| 11 |
-
model_name = "
|
| 12 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 13 |
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map="auto")
|
| 14 |
return tokenizer, model
|
|
|
|
| 5 |
from pptx.util import Inches, Pt
|
| 6 |
import os
|
| 7 |
import io
|
| 8 |
+
from huggingface_hub import InferenceClient
|
| 9 |
+
|
| 10 |
+
# Initialize the client
|
| 11 |
+
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 12 |
|
| 13 |
@st.cache_resource
|
| 14 |
def load_model():
|
| 15 |
+
model_name = "Mixtral-8x7B-Instruct-v0.1"
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 17 |
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map="auto")
|
| 18 |
return tokenizer, model
|