Sergidev commited on
Commit
764fbdd
Β·
verified Β·
1 Parent(s): bb4bf0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,9 +6,9 @@ import spaces
6
  import torch
7
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
8
  DESCRIPTION = """\
9
- # Llama-3.1-70B-Instruct Text Completion
10
 
11
- This is a demo of [`meta-llama/Llama-3.1-70B-Instruct`](https://huggingface.co/meta-llama/Llama-3.1-70B-Instruct), a large language model fine-tuned for instruction following.
12
 
13
  Enter your text in the box below and click "Complete" to have the AI generate a completion for your input. The generated text will be appended to your input. You can stop the generation at any time by clicking the "Stop" button.
14
  """
@@ -18,7 +18,7 @@ DEFAULT_MAX_NEW_TOKENS = 1024
18
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
19
 
20
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
21
- model_id = "meta-llama/Llama-3.2-1B"
22
  tokenizer = AutoTokenizer.from_pretrained(model_id)
23
  model = AutoModelForCausalLM.from_pretrained(
24
  model_id,
 
6
  import torch
7
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
8
  DESCRIPTION = """\
9
+ # Llama-3.1-70B
10
 
11
+ This is a demo of text completion with AI LLM's.
12
 
13
  Enter your text in the box below and click "Complete" to have the AI generate a completion for your input. The generated text will be appended to your input. You can stop the generation at any time by clicking the "Stop" button.
14
  """
 
18
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
19
 
20
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
21
+ model_id = "meta-llama/Llama-3.1-70B"
22
  tokenizer = AutoTokenizer.from_pretrained(model_id)
23
  model = AutoModelForCausalLM.from_pretrained(
24
  model_id,