prithivMLmods commited on
Commit
a29c2e7
·
verified ·
1 Parent(s): c46a962

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
30
 
31
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
32
 
33
- model_id = "prithivMLmods/Llama-Express.1"
34
  tokenizer = AutoTokenizer.from_pretrained(model_id)
35
  model = AutoModelForCausalLM.from_pretrained(
36
  model_id,
@@ -58,7 +58,7 @@ def generate(
58
  gr.Warning(f"Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
59
  input_ids = input_ids.to(model.device)
60
 
61
- streamer = TextIteratorStreamer(tokenizer, timeout=40.0, skip_prompt=True, skip_special_tokens=True)
62
  generate_kwargs = dict(
63
  {"input_ids": input_ids},
64
  streamer=streamer,
 
30
 
31
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
32
 
33
+ model_id = "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
34
  tokenizer = AutoTokenizer.from_pretrained(model_id)
35
  model = AutoModelForCausalLM.from_pretrained(
36
  model_id,
 
58
  gr.Warning(f"Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
59
  input_ids = input_ids.to(model.device)
60
 
61
+ streamer = TextIteratorStreamer(tokenizer, timeout=20.0, skip_prompt=True, skip_special_tokens=True)
62
  generate_kwargs = dict(
63
  {"input_ids": input_ids},
64
  streamer=streamer,