Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,8 @@ if UseMemory:
|
|
36 |
repo = Repository(
|
37 |
local_dir="data", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
|
38 |
)
|
39 |
-
|
|
|
40 |
def store_message(name: str, message: str):
|
41 |
if name and message:
|
42 |
with open(DATA_FILE, "a") as csvfile:
|
@@ -72,6 +73,7 @@ title = "💬ChatBack🧠💾"
|
|
72 |
description = """Chatbot With persistent memory dataset allowing multiagent system AI to access a shared dataset as memory pool with stored interactions.
|
73 |
Current Best SOTA Chatbot: https://huggingface.co/facebook/blenderbot-400M-distill?text=Hey+my+name+is+ChatBack%21+Are+you+ready+to+rock%3F """
|
74 |
|
|
|
75 |
def chat(message, history):
|
76 |
history = history or []
|
77 |
if history:
|
@@ -96,7 +98,6 @@ def chat(message, history):
|
|
96 |
return history, history
|
97 |
|
98 |
|
99 |
-
|
100 |
gr.Interface(
|
101 |
fn=chat,
|
102 |
theme="huggingface",
|
@@ -106,20 +107,7 @@ gr.Interface(
|
|
106 |
title=title,
|
107 |
allow_flagging="never",
|
108 |
|
109 |
-
|
110 |
description=f"Gradio chatbot backed by memory in a dataset repository.",
|
111 |
article=f"The memory dataset for saves is [{DATASET_REPO_URL}]({DATASET_REPO_URL}) 🦃Thanks!🦃 Check out HF Datasets: https://huggingface.co/spaces/awacke1/FreddysDatasetViewer SOTA papers code and datasets on chat are here: https://paperswithcode.com/datasets?q=chat&v=lst&o=newest"
|
112 |
|
113 |
).launch(debug=True)
|
114 |
-
|
115 |
-
#demo = gr.Blocks()
|
116 |
-
#with demo:
|
117 |
-
# audio_file = gr.inputs.Audio(source="microphone", type="filepath")
|
118 |
-
# text = gr.Textbox(label="Speech to Text")
|
119 |
-
# TTSchoice = gr.inputs.Radio( label="Pick a Text to Speech Model", choices=MODEL_NAMES, )
|
120 |
-
# audio = gr.Audio(label="Output", interactive=False)
|
121 |
-
# b1 = gr.Button("Recognize Speech")
|
122 |
-
# b5 = gr.Button("Read It Back Aloud")
|
123 |
-
# b1.click(speech_to_text, inputs=audio_file, outputs=text)
|
124 |
-
# b5.click(tts, inputs=[text,TTSchoice], outputs=audio)
|
125 |
-
#demo.launch(share=True)
|
|
|
36 |
repo = Repository(
|
37 |
local_dir="data", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
|
38 |
)
|
39 |
+
|
40 |
+
|
41 |
def store_message(name: str, message: str):
|
42 |
if name and message:
|
43 |
with open(DATA_FILE, "a") as csvfile:
|
|
|
73 |
description = """Chatbot With persistent memory dataset allowing multiagent system AI to access a shared dataset as memory pool with stored interactions.
|
74 |
Current Best SOTA Chatbot: https://huggingface.co/facebook/blenderbot-400M-distill?text=Hey+my+name+is+ChatBack%21+Are+you+ready+to+rock%3F """
|
75 |
|
76 |
+
|
77 |
def chat(message, history):
|
78 |
history = history or []
|
79 |
if history:
|
|
|
98 |
return history, history
|
99 |
|
100 |
|
|
|
101 |
gr.Interface(
|
102 |
fn=chat,
|
103 |
theme="huggingface",
|
|
|
107 |
title=title,
|
108 |
allow_flagging="never",
|
109 |
|
|
|
110 |
description=f"Gradio chatbot backed by memory in a dataset repository.",
|
111 |
article=f"The memory dataset for saves is [{DATASET_REPO_URL}]({DATASET_REPO_URL}) 🦃Thanks!🦃 Check out HF Datasets: https://huggingface.co/spaces/awacke1/FreddysDatasetViewer SOTA papers code and datasets on chat are here: https://paperswithcode.com/datasets?q=chat&v=lst&o=newest"
|
112 |
|
113 |
).launch(debug=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|