anpigon commited on
Commit
8a45bc6
ยท
1 Parent(s): 1346829

refactor: Remove commented out code in app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -28,11 +28,11 @@ retriever = load_retrievers(embeddings)
28
 
29
  # ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ชจ๋ธ ๋ชฉ๋ก (key: ๋ชจ๋ธ ์‹๋ณ„์ž, value: ์‚ฌ์šฉ์ž์—๊ฒŒ ํ‘œ์‹œํ•  ๋ ˆ์ด๋ธ”)
30
  AVAILABLE_MODELS = {
31
- "gpt_3_5_turbo": "GPT-3.5 Turbo",
32
  "gpt_4o": "GPT-4o",
33
  "claude_3_5_sonnet": "Claude 3.5 Sonnet",
34
  "gemini_1_5_flash": "Gemini 1.5 Flash",
35
- "llama3_70b": "Llama3 70b",
36
  }
37
 
38
 
@@ -41,7 +41,7 @@ def create_rag_chain(chat_history: List[Tuple[str, str]], model: str):
41
  for human, ai in chat_history:
42
  langchain_messages.append(HumanMessage(content=human))
43
  langchain_messages.append(AIMessage(content=ai))
44
-
45
  llm = get_llm(streaming=STREAMING).with_config(configurable={"llm": model})
46
  prompt = get_prompt().partial(history=langchain_messages)
47
 
@@ -107,8 +107,8 @@ with gr.Blocks() as demo:
107
  chatbot = gr.Chatbot(height="50vh")
108
  msg = gr.Textbox(label="๋ฉ”์‹œ์ง€ ์ž…๋ ฅ")
109
  with gr.Row():
110
- send_btn = gr.Button("์ „์†ก")
111
  clear = gr.Button("๋Œ€ํ™” ๋‚ด์šฉ ์ง€์šฐ๊ธฐ")
 
112
 
113
  def user(user_message, history):
114
  return "", history + [[user_message, None]]
@@ -130,4 +130,4 @@ with gr.Blocks() as demo:
130
  clear.click(lambda: None, None, chatbot, queue=False)
131
 
132
  if __name__ == "__main__":
133
- demo.launch()
 
28
 
29
  # ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ชจ๋ธ ๋ชฉ๋ก (key: ๋ชจ๋ธ ์‹๋ณ„์ž, value: ์‚ฌ์šฉ์ž์—๊ฒŒ ํ‘œ์‹œํ•  ๋ ˆ์ด๋ธ”)
30
  AVAILABLE_MODELS = {
31
+ # "gpt_3_5_turbo": "GPT-3.5 Turbo",
32
  "gpt_4o": "GPT-4o",
33
  "claude_3_5_sonnet": "Claude 3.5 Sonnet",
34
  "gemini_1_5_flash": "Gemini 1.5 Flash",
35
+ # "llama3_70b": "Llama3 70b",
36
  }
37
 
38
 
 
41
  for human, ai in chat_history:
42
  langchain_messages.append(HumanMessage(content=human))
43
  langchain_messages.append(AIMessage(content=ai))
44
+
45
  llm = get_llm(streaming=STREAMING).with_config(configurable={"llm": model})
46
  prompt = get_prompt().partial(history=langchain_messages)
47
 
 
107
  chatbot = gr.Chatbot(height="50vh")
108
  msg = gr.Textbox(label="๋ฉ”์‹œ์ง€ ์ž…๋ ฅ")
109
  with gr.Row():
 
110
  clear = gr.Button("๋Œ€ํ™” ๋‚ด์šฉ ์ง€์šฐ๊ธฐ")
111
+ send_btn = gr.Button("์ „์†ก")
112
 
113
  def user(user_message, history):
114
  return "", history + [[user_message, None]]
 
130
  clear.click(lambda: None, None, chatbot, queue=False)
131
 
132
  if __name__ == "__main__":
133
+ demo.launch()