frankai98 commited on
Commit
e1a461b
·
verified ·
1 Parent(s): 58f22e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -44,16 +44,6 @@ def timer():
44
  <script src="https://gist.githubusercontent.com/streamlit-resources/1837910cd9e3d5f8b7e4a/raw/timer.js"></script>
45
  """
46
 
47
- # Modified stop command
48
- def stop_timer():
49
- return """
50
- <script>
51
- // Safely stop timer if exists
52
- if (window.parent.timerControls) {
53
- window.parent.timerControls.stop();
54
- }
55
- </script>
56
- """
57
 
58
  # Page setup
59
  st.set_page_config(page_title="Your Image to Audio Story", page_icon="🦜")
@@ -74,7 +64,7 @@ def img2text(url):
74
  return models["img_model"](url)[0]["generated_text"]
75
 
76
  def text2story(text):
77
- prompt = f"Generate a brief 100-word story about: {text}"
78
  messages = [
79
  {"role": "system", "content": "You are a helpful assistant."},
80
  {"role": "user", "content": prompt}
 
44
  <script src="https://gist.githubusercontent.com/streamlit-resources/1837910cd9e3d5f8b7e4a/raw/timer.js"></script>
45
  """
46
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  # Page setup
49
  st.set_page_config(page_title="Your Image to Audio Story", page_icon="🦜")
 
64
  return models["img_model"](url)[0]["generated_text"]
65
 
66
  def text2story(text):
67
+ prompt = f"Generate a 100-word story about: {text}"
68
  messages = [
69
  {"role": "system", "content": "You are a helpful assistant."},
70
  {"role": "user", "content": prompt}