Krzysztof Krystian Jankowski commited on
Commit
6a394c6
1 Parent(s): c567944
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import streamlit as st
2
  from ctransformers import AutoModelForCausalLM
3
- import torch
4
- llm = AutoModelForCausalLM.from_pretrained("TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF", gpu_layers=24)
5
 
6
  # Streamlit UI
7
  st.set_page_config(page_title="GenBlog Demo",
@@ -11,8 +10,7 @@ st.set_page_config(page_title="GenBlog Demo",
11
  st.header("GenBlog Demo 📚")
12
  st.subheader('This is a demo of the GenBlog assistant', divider='rainbow')
13
  st.write("Enter a blog topic and the blog style to generate a blog post.")
14
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
15
- st.write(f"Based on the TinyLlama 🦙 model by TheBloke. Device: {device} 🚀")
16
  st.divider()
17
  input_text=st.text_input("Enter the Blog Topic")
18
  blog_style=st.selectbox("Select the Blog Style", ["Personal", "Casual", "Proffesional"])
 
1
  import streamlit as st
2
  from ctransformers import AutoModelForCausalLM
3
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF")
 
4
 
5
  # Streamlit UI
6
  st.set_page_config(page_title="GenBlog Demo",
 
10
  st.header("GenBlog Demo 📚")
11
  st.subheader('This is a demo of the GenBlog assistant', divider='rainbow')
12
  st.write("Enter a blog topic and the blog style to generate a blog post.")
13
+ st.write(f"Based on the TinyLlama 🦙 model by TheBloke. Device: cpu")
 
14
  st.divider()
15
  input_text=st.text_input("Enter the Blog Topic")
16
  blog_style=st.selectbox("Select the Blog Style", ["Personal", "Casual", "Proffesional"])