pyresearch commited on
Commit
5faff6c
1 Parent(s): 22aed87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -4,21 +4,16 @@ import torch
4
 
5
  # Load tokenizer and model
6
  tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2", trust_remote_code=True)
7
-
8
-
9
-
10
  model = AutoModelForCausalLM.from_pretrained(
11
  "microsoft/phi-2", torch_dtype=torch.float32, device_map="auto", trust_remote_code=True
12
  )
13
 
14
-
15
  # Streamlit app
16
  st.title("Fake news Generation with Transformers Microsoft phi-2")
17
-
18
  st.image("https://raw.githubusercontent.com/noorkhokhar99/NewsGuardian/main/logo.jpeg")
19
 
20
  # User input
21
- prompt = st.text_area("Enter your prompt:", "This news is real or fake you get results from here NewsGuardian")
22
 
23
  # Generate output
24
  if st.button("Generate"):
 
4
 
5
  # Load tokenizer and model
6
  tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2", trust_remote_code=True)
 
 
 
7
  model = AutoModelForCausalLM.from_pretrained(
8
  "microsoft/phi-2", torch_dtype=torch.float32, device_map="auto", trust_remote_code=True
9
  )
10
 
 
11
  # Streamlit app
12
  st.title("Fake news Generation with Transformers Microsoft phi-2")
 
13
  st.image("https://raw.githubusercontent.com/noorkhokhar99/NewsGuardian/main/logo.jpeg")
14
 
15
  # User input
16
+ prompt = st.text_area("Enter your prompt:", "This news is real or fake; you get results from here NewsGuardian")
17
 
18
  # Generate output
19
  if st.button("Generate"):