Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,10 +7,12 @@ class GroupTherapyAgent:
|
|
7 |
def __init__(self, client):
|
8 |
self.client = client
|
9 |
self.max_length = 64
|
10 |
-
|
11 |
def get_response(self, user_question):
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
|
15 |
class GroupTherapyApplication:
|
16 |
def __init__(self, client):
|
|
|
7 |
def __init__(self, client):
|
8 |
self.client = client
|
9 |
self.max_length = 64
|
10 |
+
|
11 |
def get_response(self, user_question):
|
12 |
+
# Make an API call to the model and get the response
|
13 |
+
response = self.client(inputs=user_question, parameters={"max_length": self.max_length, "num_beams": 4}, options={"wait_for_model": True})
|
14 |
+
return response['generated_text']
|
15 |
+
|
16 |
|
17 |
class GroupTherapyApplication:
|
18 |
def __init__(self, client):
|