Spaces:
Sleeping
Sleeping
add url
Browse files
app.py
CHANGED
|
@@ -52,7 +52,7 @@ async def summarize(input_text: str, input_url: str):
|
|
| 52 |
config=config
|
| 53 |
).run_async()
|
| 54 |
|
| 55 |
-
return res
|
| 56 |
|
| 57 |
else:
|
| 58 |
return "テキストかURLを入力してください。"
|
|
@@ -70,6 +70,8 @@ async def chat(input_text, input_url):
|
|
| 70 |
response = requests.post(endpoint, headers=headers, data=json_payload)
|
| 71 |
response_msgs = extract_texts(response.text)
|
| 72 |
result = ''.join(response_msgs)
|
|
|
|
|
|
|
| 73 |
return result
|
| 74 |
|
| 75 |
with gr.Blocks() as iface:
|
|
|
|
| 52 |
config=config
|
| 53 |
).run_async()
|
| 54 |
|
| 55 |
+
return res
|
| 56 |
|
| 57 |
else:
|
| 58 |
return "テキストかURLを入力してください。"
|
|
|
|
| 70 |
response = requests.post(endpoint, headers=headers, data=json_payload)
|
| 71 |
response_msgs = extract_texts(response.text)
|
| 72 |
result = ''.join(response_msgs)
|
| 73 |
+
if input_url:
|
| 74 |
+
result += f'\n{input_url}'
|
| 75 |
return result
|
| 76 |
|
| 77 |
with gr.Blocks() as iface:
|