Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,9 +35,7 @@ def AIMemory(name: str, message: str):
|
|
| 35 |
commit_url = repo.push_to_hub()
|
| 36 |
return ""
|
| 37 |
|
| 38 |
-
|
| 39 |
-
context = file.read()
|
| 40 |
-
|
| 41 |
# Set up cloned dataset from repo for operations
|
| 42 |
repo = Repository(
|
| 43 |
local_dir="data", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
|
|
@@ -65,6 +63,8 @@ def calculator(text1, operation, text2, contextText):
|
|
| 65 |
saved = AIMemory(text1 + " " + text2, output)
|
| 66 |
return output.replace(text1, "").replace(text2, "")
|
| 67 |
|
|
|
|
|
|
|
| 68 |
contextBox = gr.Textbox(lines=3, default=context, label="Story starter")
|
| 69 |
|
| 70 |
demo = gr.Interface(
|
|
|
|
| 35 |
commit_url = repo.push_to_hub()
|
| 36 |
return ""
|
| 37 |
|
| 38 |
+
|
|
|
|
|
|
|
| 39 |
# Set up cloned dataset from repo for operations
|
| 40 |
repo = Repository(
|
| 41 |
local_dir="data", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
|
|
|
|
| 63 |
saved = AIMemory(text1 + " " + text2, output)
|
| 64 |
return output.replace(text1, "").replace(text2, "")
|
| 65 |
|
| 66 |
+
with open('Mindfulness.txt', 'r') as file:
|
| 67 |
+
context = file.read()
|
| 68 |
contextBox = gr.Textbox(lines=3, default=context, label="Story starter")
|
| 69 |
|
| 70 |
demo = gr.Interface(
|