Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
import subprocess
|
2 |
import gradio as gr
|
3 |
from transformers import TFAutoModelForCausalLM, AutoTokenizer
|
@@ -18,7 +22,7 @@ def chatbot(input, history=[]):
|
|
18 |
history.append((input, output))
|
19 |
return history, history
|
20 |
|
21 |
-
title = "
|
22 |
inputs = ["text", "state"]
|
23 |
outputs = ["chatbot", "state"]
|
24 |
interface = gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title=title)
|
|
|
1 |
+
import subprocess
|
2 |
+
subprocess.check_call(["pip", "install", "-q", "openai"])
|
3 |
+
subprocess.check_call(["pip", "install", "-q", "gradio", "transformers", "python-dotenv"])
|
4 |
+
|
5 |
import subprocess
|
6 |
import gradio as gr
|
7 |
from transformers import TFAutoModelForCausalLM, AutoTokenizer
|
|
|
22 |
history.append((input, output))
|
23 |
return history, history
|
24 |
|
25 |
+
title = "ChatSherman"
|
26 |
inputs = ["text", "state"]
|
27 |
outputs = ["chatbot", "state"]
|
28 |
interface = gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title=title)
|