Spaces:
Running
on
Zero
Running
on
Zero
zamalali
commited on
Commit
·
f1e023c
1
Parent(s):
2da0a7b
Remove consent text and button from DeepGit Lite UI, streamline main block visibility, and adjust GPU wrapper annotation
Browse files
app.py
CHANGED
@@ -60,18 +60,6 @@ DeepGit Lite is a streamlined tool for semantic search on GitHub repositories. I
|
|
60 |
</p>
|
61 |
"""
|
62 |
|
63 |
-
consent_text = """
|
64 |
-
<div>
|
65 |
-
<p>
|
66 |
-
By using DeepGit Lite, you consent to temporary processing of your query for semantic search and ranking purposes.
|
67 |
-
</p>
|
68 |
-
<p>
|
69 |
-
⭐ Star us on GitHub if you find this tool useful!<br/>
|
70 |
-
<a href="https://github.com/zamalali/DeepGit" target="_blank">GitHub</a>
|
71 |
-
</p>
|
72 |
-
</div>
|
73 |
-
"""
|
74 |
-
|
75 |
footer = """
|
76 |
<div>
|
77 |
Made with ❤️ by <b>Zamal</b>
|
@@ -114,7 +102,7 @@ def parse_result_to_html(raw_result: str) -> str:
|
|
114 |
# ---------------------------
|
115 |
# GPU-enabled Wrapper for Repository Ranking
|
116 |
# ---------------------------
|
117 |
-
|
118 |
def gpu_run_repo(topic: str):
|
119 |
return run_repository_ranking(topic)
|
120 |
|
@@ -156,11 +144,7 @@ with gr.Blocks() as demo:
|
|
156 |
gr.HTML(title)
|
157 |
gr.HTML(description)
|
158 |
|
159 |
-
with gr.Column()
|
160 |
-
gr.HTML(consent_text)
|
161 |
-
agree_button = gr.Button("I Agree", variant="primary")
|
162 |
-
|
163 |
-
with gr.Column(visible=False) as main_block:
|
164 |
research_input = gr.Textbox(
|
165 |
label="Research Topic",
|
166 |
placeholder="Enter your research topic here, e.g., 'Fine tuning Instruction tuned LLama models...'",
|
@@ -172,11 +156,6 @@ with gr.Blocks() as demo:
|
|
172 |
output_html = gr.HTML("")
|
173 |
state = gr.State([])
|
174 |
|
175 |
-
def enable_main():
|
176 |
-
return gr.update(visible=False), gr.update(visible=True)
|
177 |
-
|
178 |
-
agree_button.click(fn=enable_main, inputs=[], outputs=[consent_block, main_block], queue=False)
|
179 |
-
|
180 |
# Yield an initial status message for immediate feedback
|
181 |
def lite_runner(topic):
|
182 |
yield "Workflow started", "<p>Processing your request. Please wait...</p>"
|
@@ -202,4 +181,3 @@ with gr.Blocks() as demo:
|
|
202 |
gr.HTML(footer)
|
203 |
|
204 |
demo.queue(max_size=10).launch()
|
205 |
-
|
|
|
60 |
</p>
|
61 |
"""
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
footer = """
|
64 |
<div>
|
65 |
Made with ❤️ by <b>Zamal</b>
|
|
|
102 |
# ---------------------------
|
103 |
# GPU-enabled Wrapper for Repository Ranking
|
104 |
# ---------------------------
|
105 |
+
#@spaces.GPU(duration=180)
|
106 |
def gpu_run_repo(topic: str):
|
107 |
return run_repository_ranking(topic)
|
108 |
|
|
|
144 |
gr.HTML(title)
|
145 |
gr.HTML(description)
|
146 |
|
147 |
+
with gr.Column():
|
|
|
|
|
|
|
|
|
148 |
research_input = gr.Textbox(
|
149 |
label="Research Topic",
|
150 |
placeholder="Enter your research topic here, e.g., 'Fine tuning Instruction tuned LLama models...'",
|
|
|
156 |
output_html = gr.HTML("")
|
157 |
state = gr.State([])
|
158 |
|
|
|
|
|
|
|
|
|
|
|
159 |
# Yield an initial status message for immediate feedback
|
160 |
def lite_runner(topic):
|
161 |
yield "Workflow started", "<p>Processing your request. Please wait...</p>"
|
|
|
181 |
gr.HTML(footer)
|
182 |
|
183 |
demo.queue(max_size=10).launch()
|
|