Sakalti commited on
Commit
a4e5d59
1 Parent(s): e93013e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
- # 使用可能なモデルのリスト
5
  # 使用可能なモデルのリスト
6
  models = ["Sakalti/Saba1.5-Pro", "Sakalti/Saba2-Preview", "Sakalti/Saba2.1-Preview"]
7
 
@@ -14,6 +13,18 @@ def respond(
14
  top_p,
15
  selected_model
16
  ):
 
 
 
 
 
 
 
 
 
 
 
 
17
  # 選択したモデルに基づいてInferenceClientを初期化
18
  client = InferenceClient(selected_model)
19
 
@@ -61,4 +72,4 @@ demo = gr.ChatInterface(
61
  )
62
 
63
  if __name__ == "__main__":
64
- demo.launch()
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
 
4
  # 使用可能なモデルのリスト
5
  models = ["Sakalti/Saba1.5-Pro", "Sakalti/Saba2-Preview", "Sakalti/Saba2.1-Preview"]
6
 
 
13
  top_p,
14
  selected_model
15
  ):
16
+ # デバッグ用: 各入力値の型を出力
17
+ print(f"Message: {message} (Type: {type(message)})")
18
+ print(f"History: {history} (Type: {type(history)})")
19
+ print(f"System Message: {system_message} (Type: {type(system_message)})")
20
+ print(f"Max Tokens: {max_tokens} (Type: {type(max_tokens)})")
21
+ print(f"Temperature: {temperature} (Type: {type(temperature)})")
22
+ print(f"Top-p: {top_p} (Type: {type(top_p)})")
23
+ print(f"Selected Model: {selected_model} (Type: {type(selected_model)})")
24
+
25
+ # 型変換: selected_modelを文字列に変換
26
+ selected_model = str(selected_model)
27
+
28
  # 選択したモデルに基づいてInferenceClientを初期化
29
  client = InferenceClient(selected_model)
30
 
 
72
  )
73
 
74
  if __name__ == "__main__":
75
+ demo.launch()