Spaces:
Runtime error
Runtime error
LanHarmony
commited on
Commit
·
59ebd8c
1
Parent(s):
458c29d
introduce control net
Browse files
app.py
CHANGED
@@ -55,8 +55,15 @@ from langchain.llms.openai import OpenAI
|
|
55 |
from langchain.vectorstores import Weaviate
|
56 |
import re
|
57 |
import gradio as gr
|
|
|
58 |
|
|
|
|
|
|
|
59 |
|
|
|
|
|
|
|
60 |
|
61 |
def cut_dialogue_history(history_memory, keep_last_n_words=500):
|
62 |
tokens = history_memory.split()
|
|
|
55 |
from langchain.vectorstores import Weaviate
|
56 |
import re
|
57 |
import gradio as gr
|
58 |
+
import subprocess
|
59 |
|
60 |
+
def execute_cmd(cmd):
|
61 |
+
output = subprocess.check_output(cmd, shell=True)
|
62 |
+
return output
|
63 |
|
64 |
+
execute_cmd('ln -s ControlNet/ldm ./ldm')
|
65 |
+
execute_cmd('ln -s ControlNet/cldm ./cldm')
|
66 |
+
execute_cmd('ln -s ControlNet/annotator ./annotator')
|
67 |
|
68 |
def cut_dialogue_history(history_memory, keep_last_n_words=500):
|
69 |
tokens = history_memory.split()
|