Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def text_prompt(request, page_url, contraseña, temp):
|
|
45 |
iface = gr.Interface(
|
46 |
fn=text_prompt,
|
47 |
inputs=[gr.Textbox(lines=1, placeholder="Enter your prompt here...", label="Prompt:", type="text"),
|
48 |
-
gr.Textbox(lines=1, placeholder="Enter the URL here...", label="URL:", type="text"),
|
49 |
gr.Textbox(lines=1, placeholder="Enter your API-key here...", label="API-Key:", type="password"),
|
50 |
gr.Slider(0.0,1.0, value=0.3, label="Temperature:")
|
51 |
],
|
@@ -53,6 +53,9 @@ iface = gr.Interface(
|
|
53 |
examples=[["Summarize the following text as a list:","https://blog.google/outreach-initiatives/google-org/our-commitment-on-using-ai-to-accelerate-progress-on-global-development-goals/","",0.3],
|
54 |
["Generate a summary of the following text. Give me an overview of main business impact from the text following this template:\n- Summary:\n- Business Impact:\n- Companies:", "https://ai.googleblog.com/2019/10/quantum-supremacy-using-programmable.html","",0.7]
|
55 |
]
|
|
|
|
|
|
|
56 |
)
|
57 |
|
58 |
iface.launch(inline=False)
|
|
|
45 |
iface = gr.Interface(
|
46 |
fn=text_prompt,
|
47 |
inputs=[gr.Textbox(lines=1, placeholder="Enter your prompt here...", label="Prompt:", type="text"),
|
48 |
+
gr.Textbox(lines=1, placeholder="Enter the URL here...", label="URL to parse:", type="text"),
|
49 |
gr.Textbox(lines=1, placeholder="Enter your API-key here...", label="API-Key:", type="password"),
|
50 |
gr.Slider(0.0,1.0, value=0.3, label="Temperature:")
|
51 |
],
|
|
|
53 |
examples=[["Summarize the following text as a list:","https://blog.google/outreach-initiatives/google-org/our-commitment-on-using-ai-to-accelerate-progress-on-global-development-goals/","",0.3],
|
54 |
["Generate a summary of the following text. Give me an overview of main business impact from the text following this template:\n- Summary:\n- Business Impact:\n- Companies:", "https://ai.googleblog.com/2019/10/quantum-supremacy-using-programmable.html","",0.7]
|
55 |
]
|
56 |
+
title="ChatGPT info extraction",
|
57 |
+
description="This tool allows querying the text retrieved from the URL using OpenAI's [text-davinci-003] engine.\nThe URL text can be referenced in the prompt as \"following text\".\nA GPT2 tokenizer is included to ensure that the 2000 token limit for OpenAI queries is not exceeded.",
|
58 |
+
footer="Provide a prompt with your request, the url for text retrieval, your api-key and temperature to process the text."
|
59 |
)
|
60 |
|
61 |
iface.launch(inline=False)
|