SpyroSigma commited on
Commit
255d330
·
verified ·
1 Parent(s): 51e38ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -2,12 +2,14 @@ import streamlit as st
2
  from llama_cpp import Llama
3
  from PIL import Image
4
  import numpy as np
 
 
5
 
6
  # Initialize the model (only once)
7
  @st.cache_resource
8
  def load_model():
9
  return Llama(
10
- model_path="models/bitmap-mistral-M7-slerp-alpaca-70m.gguf",
11
  n_ctx=2048,
12
  n_threads=4
13
  )
@@ -22,7 +24,7 @@ if st.button("Generate Bitmap"):
22
  # Generate the bitmap description
23
  llm = load_model()
24
  response = llm(
25
- f"Generate a 32x32 bitmap array using 0s and 1s that represents {prompt}. "
26
  "Only output the array, no other text.",
27
  max_tokens=2048,
28
  temperature=0.7
 
2
  from llama_cpp import Llama
3
  from PIL import Image
4
  import numpy as np
5
+ from transformers import AutoModel
6
+ model = AutoModel.from_pretrained("liminerity/bitmap-mistral-M7-slerp-alpaca-70m-gguf")
7
 
8
  # Initialize the model (only once)
9
  @st.cache_resource
10
  def load_model():
11
  return Llama(
12
+ model_path=model,
13
  n_ctx=2048,
14
  n_threads=4
15
  )
 
24
  # Generate the bitmap description
25
  llm = load_model()
26
  response = llm(
27
+ f"Generate a 64x64 bitmap array using 0s and 1s that represents {prompt}. "
28
  "Only output the array, no other text.",
29
  max_tokens=2048,
30
  temperature=0.7