Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,12 @@ import gradio as gr
|
|
2 |
import spaces
|
3 |
## Load model directly
|
4 |
# Load model directly
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
8 |
@spaces.GPU(duration=120)
|
9 |
|
10 |
# Fonction de génération de texte
|
|
|
2 |
import spaces
|
3 |
## Load model directly
|
4 |
# Load model directly
|
5 |
+
# Load model directly
|
6 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
7 |
+
|
8 |
+
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-72B-Instruct")
|
9 |
+
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2-72B-Instruct")
|
10 |
+
|
11 |
@spaces.GPU(duration=120)
|
12 |
|
13 |
# Fonction de génération de texte
|