Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,11 +40,12 @@ def generate(
|
|
40 |
if formatted_prompt in database:
|
41 |
response = database[formatted_prompt]
|
42 |
else:
|
43 |
-
response =
|
44 |
-
|
|
|
45 |
save_database(database) # Save the updated database
|
46 |
|
47 |
-
yield
|
48 |
|
49 |
css = """
|
50 |
#mkd {
|
|
|
40 |
if formatted_prompt in database:
|
41 |
response = database[formatted_prompt]
|
42 |
else:
|
43 |
+
response = client.text_generation(formatted_prompt, details=True, return_full_text=False)
|
44 |
+
response_text = response.generated_tokens[0].text
|
45 |
+
database[formatted_prompt] = response_text
|
46 |
save_database(database) # Save the updated database
|
47 |
|
48 |
+
yield response_text
|
49 |
|
50 |
css = """
|
51 |
#mkd {
|