Spaces:
Runtime error
Runtime error
remove loading readme
Browse files
app.py
CHANGED
@@ -48,7 +48,6 @@ def make_frontend(
|
|
48 |
"""Creates a gradio.Interface frontend for text to image search function."""
|
49 |
|
50 |
allow_flagging = "never"
|
51 |
-
readme = _load_readme(with_logging=allow_flagging == "manual")
|
52 |
|
53 |
# build a basic browser interface to a Python function
|
54 |
frontend = gr.Interface(
|
@@ -59,7 +58,6 @@ def make_frontend(
|
|
59 |
title="π Text2Image π", # what should we display at the top of the page?
|
60 |
thumbnail=FAVICON, # what should we display when the link is shared, e.g. on social media?
|
61 |
description=__doc__, # what should we display just above the interface?
|
62 |
-
article=readme, # what long-form content should we display below the interface?
|
63 |
cache_examples=False, # should we cache those inputs for faster inference? slows down start
|
64 |
allow_flagging=allow_flagging, # should we show users the option to "flag" outputs?
|
65 |
flagging_options=["incorrect", "offensive", "other"], # what options do users have for feedback?
|
@@ -100,16 +98,6 @@ class PredictorBackend:
|
|
100 |
logging.info(f"PRED >begin\n{pred}\nPRED >end")
|
101 |
|
102 |
|
103 |
-
def _load_readme(with_logging=False):
|
104 |
-
with open(README) as f:
|
105 |
-
lines = f.readlines()
|
106 |
-
if not with_logging:
|
107 |
-
lines = lines[: lines.index("<!-- logging content below -->\n")]
|
108 |
-
|
109 |
-
readme = "".join(lines)
|
110 |
-
return readme
|
111 |
-
|
112 |
-
|
113 |
def _make_parser():
|
114 |
parser = argparse.ArgumentParser(description=__doc__)
|
115 |
parser.add_argument(
|
|
|
48 |
"""Creates a gradio.Interface frontend for text to image search function."""
|
49 |
|
50 |
allow_flagging = "never"
|
|
|
51 |
|
52 |
# build a basic browser interface to a Python function
|
53 |
frontend = gr.Interface(
|
|
|
58 |
title="π Text2Image π", # what should we display at the top of the page?
|
59 |
thumbnail=FAVICON, # what should we display when the link is shared, e.g. on social media?
|
60 |
description=__doc__, # what should we display just above the interface?
|
|
|
61 |
cache_examples=False, # should we cache those inputs for faster inference? slows down start
|
62 |
allow_flagging=allow_flagging, # should we show users the option to "flag" outputs?
|
63 |
flagging_options=["incorrect", "offensive", "other"], # what options do users have for feedback?
|
|
|
98 |
logging.info(f"PRED >begin\n{pred}\nPRED >end")
|
99 |
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
def _make_parser():
|
102 |
parser = argparse.ArgumentParser(description=__doc__)
|
103 |
parser.add_argument(
|