Jessiesj commited on
Commit
c44c93e
·
verified ·
1 Parent(s): 1d281df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
- from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
3
- import torch
4
  # function part
5
  # img2text
6
  def img2text(url):
@@ -10,7 +10,7 @@ def img2text(url):
10
 
11
  # text2story
12
  def text2story(text):
13
- text_to_story = pipeline("text-generation", model="TheBloke/storytime-13B-GPTQ")
14
  # story_text = "" # to be completed
15
  story_text = text_to_story(text)[0]["generated_text"]
16
  return story_text
 
1
  import streamlit as st
2
+ from transformers import pipeline
3
+
4
  # function part
5
  # img2text
6
  def img2text(url):
 
10
 
11
  # text2story
12
  def text2story(text):
13
+ text_to_story = pipeline("text-generation", model="ajibawa-2023/Young-Children-Storyteller-Mistral-7B")
14
  # story_text = "" # to be completed
15
  story_text = text_to_story(text)[0]["generated_text"]
16
  return story_text