mrchuy commited on
Commit
383ac0c
1 Parent(s): 6742ea5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1,13 +1,11 @@
1
  import gradio as gr
2
- from transformers import pipeline
3
  import torch
4
  from transformers import AutoTokenizer, AutoModelForCausalLM
5
 
6
- # tokenizer = AutoTokenizer.from_pretrained("Salesforce/xgen-7b-8k-base", trust_remote_code=True)
7
- # model = AutoModelForCausalLM.from_pretrained("Salesforce/xgen-7b-8k-base", torch_dtype=torch.bfloat16)
8
 
9
 
10
- # pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
11
 
12
  def gentext(user_input="The world is"):
13
  inputs = tokenizer(user_input, return_tensors="pt")
 
1
  import gradio as gr
 
2
  import torch
3
  from transformers import AutoTokenizer, AutoModelForCausalLM
4
 
5
+ tokenizer = AutoTokenizer.from_pretrained("Salesforce/xgen-7b-8k-base", trust_remote_code=True)
6
+ model = AutoModelForCausalLM.from_pretrained("Salesforce/xgen-7b-8k-base", torch_dtype=torch.bfloat16)
7
 
8
 
 
9
 
10
  def gentext(user_input="The world is"):
11
  inputs = tokenizer(user_input, return_tensors="pt")