Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,10 +2,9 @@ import gradio as gr
|
|
2 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
from vllm import SamplingParams, LLM
|
4 |
|
5 |
-
# Load the model and tokenizer from Hugging Face
|
6 |
-
model_name = "Qwen/Qwen2-7B"
|
7 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
8 |
-
engine = LLM
|
9 |
|
10 |
def generate_response(prompt, max_tokens, temperature, top_p):
|
11 |
# Tokenize the prompt
|
|
|
2 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
from vllm import SamplingParams, LLM
|
4 |
|
5 |
+
# Load the model and tokenizer from Hugging Face
|
|
|
6 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
7 |
+
engine = LLM(model="Qwen/Qwen2-7B")
|
8 |
|
9 |
def generate_response(prompt, max_tokens, temperature, top_p):
|
10 |
# Tokenize the prompt
|