mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-25 05:48:55 +01:00
Minor change to API code
This commit is contained in:
parent
581f739b2f
commit
1901d238e1
@ -5,6 +5,9 @@ import gradio as gr
|
|||||||
from modules import shared
|
from modules import shared
|
||||||
from modules.text_generation import generate_reply
|
from modules.text_generation import generate_reply
|
||||||
|
|
||||||
|
# set this to True to rediscover the fn_index using the browser DevTools
|
||||||
|
VISIBLE = False
|
||||||
|
|
||||||
|
|
||||||
def generate_reply_wrapper(string):
|
def generate_reply_wrapper(string):
|
||||||
generate_params = {
|
generate_params = {
|
||||||
@ -30,9 +33,9 @@ def generate_reply_wrapper(string):
|
|||||||
|
|
||||||
|
|
||||||
def create_apis():
|
def create_apis():
|
||||||
t1 = gr.Textbox(visible=False)
|
t1 = gr.Textbox(visible=VISIBLE)
|
||||||
t2 = gr.Textbox(visible=False)
|
t2 = gr.Textbox(visible=VISIBLE)
|
||||||
dummy = gr.Button(visible=False)
|
dummy = gr.Button(visible=VISIBLE)
|
||||||
|
|
||||||
input_params = [t1]
|
input_params = [t1]
|
||||||
output_params = [t2] + [shared.gradio[k] for k in ['markdown', 'html']]
|
output_params = [t2] + [shared.gradio[k] for k in ['markdown', 'html']]
|
||||||
|
Loading…
Reference in New Issue
Block a user