ldhldh commited on
Commit
42002f6
β€’
1 Parent(s): b94a65b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -8,7 +8,7 @@ import requests, os, re, asyncio
8
 
9
 
10
  loop = asyncio.get_event_loop()
11
- gradio_client = GrClient('https://83b91ee251492081a1.gradio.live/')
12
  # Monkey patch
13
  def get_types(cls_set: List[Type], component: str):
14
  docset = []
@@ -33,12 +33,11 @@ def chat(x, id):
33
  result = gradio_client.predict(
34
  x,
35
  # str representing input in 'User input' Textbox component
36
- 40,
37
  id,
38
  fn_index=0
39
  )
40
  result = str(result)
41
- output = result[len(result.rsplit(':', 1)[0]) + 2 :]
42
 
43
  return output
44
 
@@ -46,7 +45,7 @@ with gr.Blocks() as demo:
46
  count = 0
47
  aa = gr.Interface(
48
  fn=chat,
49
- inputs="text",
50
  outputs="text",
51
  description="chat",
52
  examples= [[f"λ„ˆλŠ” 꿈이 뭐야?", "771171"],[f"λ„ˆλŠ” 무슨 색을 κ°€μž₯ μ’‹μ•„ν•΄?", "772122"]]
 
8
 
9
 
10
  loop = asyncio.get_event_loop()
11
+ gradio_client = GrClient('https://4602593e320dced0af.gradio.live/')
12
  # Monkey patch
13
  def get_types(cls_set: List[Type], component: str):
14
  docset = []
 
33
  result = gradio_client.predict(
34
  x,
35
  # str representing input in 'User input' Textbox component
36
+ 50,
37
  id,
38
  fn_index=0
39
  )
40
  result = str(result)
 
41
 
42
  return output
43
 
 
45
  count = 0
46
  aa = gr.Interface(
47
  fn=chat,
48
+ inputs=["text","tt"],
49
  outputs="text",
50
  description="chat",
51
  examples= [[f"λ„ˆλŠ” 꿈이 뭐야?", "771171"],[f"λ„ˆλŠ” 무슨 색을 κ°€μž₯ μ’‹μ•„ν•΄?", "772122"]]