Spaces:
Runtime error
Runtime error
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 = []
|
|
@@ -29,12 +29,13 @@ def get_types(cls_set: List[Type], component: str):
|
|
| 29 |
routes.get_types = get_types
|
| 30 |
|
| 31 |
# App code
|
| 32 |
-
def chat(x, id):
|
| 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)
|
|
@@ -45,10 +46,10 @@ with gr.Blocks() as demo:
|
|
| 45 |
count = 0
|
| 46 |
aa = gr.Interface(
|
| 47 |
fn=chat,
|
| 48 |
-
inputs=["text","text"],
|
| 49 |
outputs="text",
|
| 50 |
description="chat",
|
| 51 |
-
examples= [[f"λλ κΏμ΄ λμΌ?", "771171"],[f"λλ λ¬΄μ¨ μμ κ°μ₯ μ’μν΄?", "772122"]]
|
| 52 |
)
|
| 53 |
|
| 54 |
demo.queue(max_size=32).launch(enable_queue=True)
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
loop = asyncio.get_event_loop()
|
| 11 |
+
gradio_client = GrClient('https://09d0a26c46adbc5587.gradio.live/')
|
| 12 |
# Monkey patch
|
| 13 |
def get_types(cls_set: List[Type], component: str):
|
| 14 |
docset = []
|
|
|
|
| 29 |
routes.get_types = get_types
|
| 30 |
|
| 31 |
# App code
|
| 32 |
+
def chat(x, id, url):
|
| 33 |
result = gradio_client.predict(
|
| 34 |
x,
|
| 35 |
# str representing input in 'User input' Textbox component
|
| 36 |
50,
|
| 37 |
id,
|
| 38 |
+
url,
|
| 39 |
fn_index=0
|
| 40 |
)
|
| 41 |
result = str(result)
|
|
|
|
| 46 |
count = 0
|
| 47 |
aa = gr.Interface(
|
| 48 |
fn=chat,
|
| 49 |
+
inputs=["text","text", "text"],
|
| 50 |
outputs="text",
|
| 51 |
description="chat",
|
| 52 |
+
examples= [[f"λλ κΏμ΄ λμΌ?", "771171", ""],[f"λλ λ¬΄μ¨ μμ κ°μ₯ μ’μν΄?", "772122", ""]]
|
| 53 |
)
|
| 54 |
|
| 55 |
demo.queue(max_size=32).launch(enable_queue=True)
|