Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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://
|
| 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 |
-
|
| 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"]]
|