qbwmwsap commited on
Commit
cab85ea
·
verified ·
1 Parent(s): 37b4174

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -5,14 +5,18 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
5
  tokenizer = AutoTokenizer.from_pretrained("qbwmwsap/amber-model-mine")
6
  model = AutoModelForCausalLM.from_pretrained("qbwmwsap/amber-model-mine")
7
 
8
- text = st.text_area("enter some text!")
 
 
9
 
10
  if text:
 
11
  input_ids = tokenizer(text, return_tensors="pt").input_ids
12
-
13
  # Run the model and get the output
14
  outputs = model.generate(input_ids)
15
-
16
  # Postprocess your output here if necessary
17
  output = tokenizer.decode(outputs[0])
18
- st.json(output)
 
 
5
  tokenizer = AutoTokenizer.from_pretrained("qbwmwsap/amber-model-mine")
6
  model = AutoModelForCausalLM.from_pretrained("qbwmwsap/amber-model-mine")
7
 
8
+ st.title('Amber-Model-Mine')
9
+
10
+ text = st.text_input('Enter some text')
11
 
12
  if text:
13
+ # Preprocess your data here
14
  input_ids = tokenizer(text, return_tensors="pt").input_ids
15
+
16
  # Run the model and get the output
17
  outputs = model.generate(input_ids)
18
+
19
  # Postprocess your output here if necessary
20
  output = tokenizer.decode(outputs[0])
21
+
22
+ st.write(output)