Spaces:
Running
Running
ryanrwatkins
commited on
Commit
•
cd72b6e
1
Parent(s):
d5be6ae
Update app.py
Browse files
app.py
CHANGED
@@ -35,14 +35,14 @@ prompt_templates = {"All Needs Experts": "Respond as if you are combination of a
|
|
35 |
actor_description = {"All Needs Experts": "<div style='float: left;margin: 0px 5px 0px 5px;'><img src='https://na.weshareresearch.com/wp-content/uploads/2023/04/experts2.jpg' alt='needs expert image' style='width:70px;align:top;'></div>A combiation of all needs assessment experts."}
|
36 |
|
37 |
|
38 |
-
prompts_archive_url = "https://huggingface.co/datasets/ryanrwatkins/na_prompts_archive"
|
39 |
-
prompts_archive_file_name = "prompts_archives.csv"
|
40 |
-
prompts_archive_file = os.path.join("prompts_archive", prompts_archive_file_name)
|
41 |
|
42 |
-
HF_TOKEN = os.environ.get("HF_token_write")
|
43 |
-
repo = Repository(
|
44 |
-
local_dir="prompts_archive", clone_from=prompts_archive_url, use_auth_token=HF_TOKEN, git_user="ryanrwatkins", git_email="rwatkins@gwu.edu"
|
45 |
-
)
|
46 |
|
47 |
|
48 |
|
@@ -98,13 +98,13 @@ def submit_message(prompt, prompt_template, temperature, max_tokens, context_len
|
|
98 |
|
99 |
|
100 |
|
101 |
-
with open(prompts_archive_file, "a") as csvfile:
|
102 |
-
writer = csv.DictWriter(csvfile, fieldnames=["prompt", "time"])
|
103 |
-
writer.writerow(
|
104 |
-
{"prompt": str(prompt), "time": str(datetime.now())}
|
105 |
-
)
|
106 |
-
commit_url = repo.push_to_hub()
|
107 |
-
print(commit_url)
|
108 |
|
109 |
system_prompt = []
|
110 |
if prompt_template:
|
|
|
35 |
actor_description = {"All Needs Experts": "<div style='float: left;margin: 0px 5px 0px 5px;'><img src='https://na.weshareresearch.com/wp-content/uploads/2023/04/experts2.jpg' alt='needs expert image' style='width:70px;align:top;'></div>A combiation of all needs assessment experts."}
|
36 |
|
37 |
|
38 |
+
#prompts_archive_url = "https://huggingface.co/datasets/ryanrwatkins/na_prompts_archive"
|
39 |
+
#prompts_archive_file_name = "prompts_archives.csv"
|
40 |
+
#prompts_archive_file = os.path.join("prompts_archive", prompts_archive_file_name)
|
41 |
|
42 |
+
#HF_TOKEN = os.environ.get("HF_token_write")
|
43 |
+
#repo = Repository(
|
44 |
+
# local_dir="prompts_archive", clone_from=prompts_archive_url, use_auth_token=HF_TOKEN, git_user="ryanrwatkins", git_email="rwatkins@gwu.edu"
|
45 |
+
#)
|
46 |
|
47 |
|
48 |
|
|
|
98 |
|
99 |
|
100 |
|
101 |
+
# with open(prompts_archive_file, "a") as csvfile:
|
102 |
+
# writer = csv.DictWriter(csvfile, fieldnames=["prompt", "time"])
|
103 |
+
# writer.writerow(
|
104 |
+
# {"prompt": str(prompt), "time": str(datetime.now())}
|
105 |
+
# )
|
106 |
+
# commit_url = repo.push_to_hub()
|
107 |
+
# print(commit_url)
|
108 |
|
109 |
system_prompt = []
|
110 |
if prompt_template:
|