Spaces:
Sleeping
Sleeping
Krzysztof Krystian Jankowski
commited on
Commit
·
baf34de
1
Parent(s):
f84a15c
cpu
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 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"
|
| 5 |
|
| 6 |
# Streamlit UI
|
| 7 |
st.set_page_config(page_title="GenBlog Demo",
|
|
@@ -12,8 +12,8 @@ st.header("GenBlog Demo 📚")
|
|
| 12 |
st.subheader('This is a demo of the GenBlog assistant', divider='rainbow')
|
| 13 |
st.write("Enter a blog topic, the number of words and the blog style to generate a blog post.")
|
| 14 |
|
| 15 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 16 |
-
st.write(f"Based on the TinyLlama 🦙 model by TheBloke.
|
| 17 |
|
| 18 |
st.divider()
|
| 19 |
|
|
|
|
| 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")
|
| 5 |
|
| 6 |
# Streamlit UI
|
| 7 |
st.set_page_config(page_title="GenBlog Demo",
|
|
|
|
| 12 |
st.subheader('This is a demo of the GenBlog assistant', divider='rainbow')
|
| 13 |
st.write("Enter a blog topic, the number of words and the blog style to generate a blog post.")
|
| 14 |
|
| 15 |
+
# device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 16 |
+
st.write(f"Based on the TinyLlama 🦙 model by TheBloke.")
|
| 17 |
|
| 18 |
st.divider()
|
| 19 |
|