Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,71 +1,21 @@
|
|
| 1 |
-
import
|
| 2 |
|
| 3 |
-
|
| 4 |
-
mylist=['1','2','3']
|
| 5 |
-
vals=[]
|
| 6 |
-
with gr.Blocks() as newblocks:
|
| 7 |
-
with gr.Column():
|
| 8 |
-
algorithm = gr.Dropdown(choices=['Ground Beams','Pile Caps'],interactive=True,label='Projects')
|
| 9 |
-
# with gr.Row():
|
| 10 |
-
# area_pattern= gr.CheckboxGroup(choices=("Area","Pattern","Border","Length","Match"),show_label=False)
|
| 11 |
-
# if algorithm=='Pile Caps':
|
| 12 |
-
# with gr.Row():
|
| 13 |
-
# drpdwnType=gr.Dropdown(choices=['Area','Border','Length','Count'],value='Area',show_label=False,interactive=True)
|
| 14 |
-
# drpdwnUnit=gr.Dropdown(choices=['m2','m'],value='m2',show_label=False,interactive=True)
|
| 15 |
|
| 16 |
-
# with gr.Row():
|
| 17 |
-
# drpdwnType=gr.Dropdown(choices=['Area','Border','Length','Count'],value='Length',show_label=False,interactive=True)
|
| 18 |
-
# drpdwnUnit=gr.Dropdown(choices=['m2','m'],value='m2',show_label=False,interactive=True)
|
| 19 |
-
# elif algorithm=='Ground Beams':
|
| 20 |
-
# with gr.Row():
|
| 21 |
-
# drpdwnType=gr.Dropdown(choices=['Area','Border','Length','Count'],value='Area',show_label=False,interactive=True)
|
| 22 |
-
# drpdwnUnit=gr.Dropdown(choices=['m2','m'],value='m2',show_label=False,interactive=True)
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
|
| 28 |
-
# with gr.Row():
|
| 29 |
-
# drpdwnType=gr.Dropdown(choices=['Area','Border','Length','Count'],value='Length',show_label=False,interactive=True)
|
| 30 |
-
# drpdwnUnit=gr.Dropdown(choices=['m2','m'],value='m2',show_label=False,interactive=True)
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
# for i in range(len(mylist)):
|
| 34 |
-
# with gr.Accordion(label='item',open=False):
|
| 35 |
-
# with gr.Row():
|
| 36 |
-
# label1=gr.Textbox(placeholder='Level',show_label=False)
|
| 37 |
-
# label2=gr.Textbox(placeholder='Section Specification',show_label=False)
|
| 38 |
-
# label3=gr.Textbox(placeholder='Depth',show_label=False)
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
#
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
projects=gr.Dropdown(choices=['BMW job1','BMW job2','Project C'],interactive=True,label='Projects')
|
| 52 |
-
projectParts=gr.Dropdown(choices=None,interactive=True,label='Project Parts')
|
| 53 |
-
NRMsection = gr.Dropdown(choices=['foundation','external','interior'], value=None, interactive=True,label='NRM Sections')
|
| 54 |
-
|
| 55 |
-
planMeasure= gr.CheckboxGroup(label='To Measure',choices=("plan1","plan2","plan3"))
|
| 56 |
-
|
| 57 |
-
RelvDocuments= gr.CheckboxGroup(label='Relevant Documents',choices=("plan1","plan2","plan3"))
|
| 58 |
-
with gr.Row():
|
| 59 |
-
saveOutputCheckBox= gr.Checkbox(label='Save Output')
|
| 60 |
-
measureBtn=gr.Button('Measure using ADR')
|
| 61 |
-
|
| 62 |
-
addBtn= gr.Button('Add ADR Identification Box')
|
| 63 |
-
|
| 64 |
-
# with gr.Row():#(visible=False) as output_col:
|
| 65 |
-
# inpu= gr.Dataframe(label='Dictionary',interactive=True ) # row_count = (5, "fixed")
|
| 66 |
-
# btn = gr.Button("Submit Ratio")
|
| 67 |
-
# btn.click(fn=printDictionary, inputs=inpu, outputs=inpu)
|
| 68 |
-
addBtn.click(fn=addADRIB)
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
mainBlock.launch()# debug=True,enable_queue=True
|
|
|
|
| 1 |
+
from flask import Flask, render_template
|
| 2 |
|
| 3 |
+
app = Flask(__name__)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
@app.route("/")
|
| 7 |
+
def home():
|
| 8 |
+
return render_template("home.html")
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
@app.route("/salvador")
|
| 12 |
+
def salvador():
|
| 13 |
+
return "Hello, Salvador"
|
| 14 |
|
| 15 |
+
@app.route("/forward/", methods=['POST'])
|
| 16 |
+
def move_forward():
|
| 17 |
+
#Moving forward code
|
| 18 |
+
forward_message = "Moving Forward..."
|
| 19 |
+
return render_template('home.html', forward_message=forward_message)
|
| 20 |
+
if __name__ == "__main__":
|
| 21 |
+
app.run(debug=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|