Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from transformers import pipeline
|
|
|
|
| 3 |
import requests
|
| 4 |
import json
|
| 5 |
import edge_tts
|
|
@@ -29,13 +30,10 @@ Female_language_dict = {
|
|
| 29 |
|
| 30 |
default_lang = "en"
|
| 31 |
engines = { default_lang: Model(default_lang) }
|
| 32 |
-
###################################################################################
|
| 33 |
|
| 34 |
-
#messages = [ {"role": "user", "content": "Who are you?"}, ]
|
| 35 |
-
client1 = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1", trust_remote_code=True)
|
| 36 |
-
#pipe(messages)
|
| 37 |
-
###################################################################################
|
| 38 |
|
|
|
|
|
|
|
| 39 |
|
| 40 |
#client1 = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
|
| 41 |
#client1 = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
#from transformers import pipeline
|
| 3 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 4 |
import requests
|
| 5 |
import json
|
| 6 |
import edge_tts
|
|
|
|
| 30 |
|
| 31 |
default_lang = "en"
|
| 32 |
engines = { default_lang: Model(default_lang) }
|
|
|
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 36 |
+
client1 = AutoModelForCausalLM.from_pretrained("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 37 |
|
| 38 |
#client1 = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
|
| 39 |
#client1 = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|