Spaces:
Runtime error
Runtime error
Jankidepala
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ Your answer: <your answer here>"""
|
|
24 |
|
25 |
messages.append({"role": "user", "content": prompt_final})
|
26 |
|
27 |
-
client = OpenAI(api_key="
|
28 |
response = client.chat.completions.create(
|
29 |
model=MODEL,
|
30 |
messages=messages,
|
@@ -83,29 +83,29 @@ description = (
|
|
83 |
|
84 |
|
85 |
|
86 |
-
def build_demo():
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
if __name__ == "__main__":
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
24 |
|
25 |
messages.append({"role": "user", "content": prompt_final})
|
26 |
|
27 |
+
client = OpenAI(api_key="sk-proj-U4WDruCnBYaUFJHaStvAT3BlbkFJ8buf9OOPTbFmmuGomSqN", base_url="http://semikong.aitomatic.com:8081/v1")
|
28 |
response = client.chat.completions.create(
|
29 |
model=MODEL,
|
30 |
messages=messages,
|
|
|
83 |
|
84 |
|
85 |
|
86 |
+
# def build_demo():
|
87 |
+
# demo = gr.ChatInterface(
|
88 |
+
# http_bot,
|
89 |
+
# chatbot=gr.Chatbot(height=600),
|
90 |
+
# textbox=gr.Textbox(
|
91 |
+
# placeholder="Ask SEMIKONG something", container=False, scale=7
|
92 |
+
# ),
|
93 |
+
# title="SEMIKONG-8B-GPTQ",
|
94 |
+
# description=description,
|
95 |
+
# theme="soft",
|
96 |
+
# cache_examples=False,
|
97 |
+
# retry_btn=None,
|
98 |
+
# undo_btn="Delete Previous",
|
99 |
+
# clear_btn="Clear",
|
100 |
+
# )
|
101 |
+
# return demo
|
102 |
+
|
103 |
+
|
104 |
+
# if __name__ == "__main__":
|
105 |
+
# parser = argparse.ArgumentParser()
|
106 |
+
# parser.add_argument("--host", type=str, default=None)
|
107 |
+
# parser.add_argument("--port", type=int, default=8001)
|
108 |
+
# args = parser.parse_args()
|
109 |
+
|
110 |
+
# demo = build_demo()
|
111 |
+
# demo.queue().launch()
|