bapfalraz commited on
Commit
9a74ca9
·
verified ·
1 Parent(s): 0d1693b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -2,8 +2,11 @@ import streamlit as st
2
  from transformers import pipeline
3
  import torch
4
  import os
 
5
 
6
- pipe = pipeline("text-generation", model="google/gemma-3-1b-pt", device="cuda", torch_dtype=torch.bfloat16, token=os.getenv('HG_TOKEN'))
 
 
7
 
8
  txt = st.text_area("Test this")
9
 
 
2
  from transformers import pipeline
3
  import torch
4
  import os
5
+ from huggingface_hub import login
6
 
7
+
8
+ login(token = os.getenv('HF_TOKEN'))
9
+ pipe = pipeline("text-generation", model="google/gemma-3-1b-pt", device="cuda", torch_dtype=torch.bfloat16)
10
 
11
  txt = st.text_area("Test this")
12