Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,12 @@ import random
|
|
6 |
import requests
|
7 |
from youtubesearchpython import VideosSearch
|
8 |
|
9 |
-
# Initialize the empathy bot pipeline
|
10 |
-
empathy_bot = pipeline("text2text-generation", model="
|
11 |
|
12 |
# Function to process the user's input and generate a dynamic response
|
13 |
def generate_dynamic_response(user_input):
|
14 |
-
# Generate an empathetic response using the model
|
15 |
response = empathy_bot(user_input)
|
16 |
empathetic_response = response[0]['generated_text']
|
17 |
|
@@ -55,7 +55,6 @@ def generate_dynamic_response(user_input):
|
|
55 |
|
56 |
return empathetic_response, suggested_activity, video_results
|
57 |
|
58 |
-
|
59 |
# Function to search for YouTube videos
|
60 |
def search_youtube_videos(query):
|
61 |
videos_search = VideosSearch(query, limit=3)
|
@@ -70,7 +69,6 @@ def search_youtube_videos(query):
|
|
70 |
|
71 |
return video_links
|
72 |
|
73 |
-
|
74 |
# Streamlit UI
|
75 |
st.title("Grief and Loss Support Bot πΏ")
|
76 |
st.markdown("Your compassionate companion in tough times π")
|
|
|
6 |
import requests
|
7 |
from youtubesearchpython import VideosSearch
|
8 |
|
9 |
+
# Initialize the empathy bot pipeline with the new model
|
10 |
+
empathy_bot = pipeline("text2text-generation", model="featherless-ai-quants/HyunCello-KULLM3-empathy-v1.0-GGUF")
|
11 |
|
12 |
# Function to process the user's input and generate a dynamic response
|
13 |
def generate_dynamic_response(user_input):
|
14 |
+
# Generate an empathetic response using the new model
|
15 |
response = empathy_bot(user_input)
|
16 |
empathetic_response = response[0]['generated_text']
|
17 |
|
|
|
55 |
|
56 |
return empathetic_response, suggested_activity, video_results
|
57 |
|
|
|
58 |
# Function to search for YouTube videos
|
59 |
def search_youtube_videos(query):
|
60 |
videos_search = VideosSearch(query, limit=3)
|
|
|
69 |
|
70 |
return video_links
|
71 |
|
|
|
72 |
# Streamlit UI
|
73 |
st.title("Grief and Loss Support Bot πΏ")
|
74 |
st.markdown("Your compassionate companion in tough times π")
|