Spaces:
Runtime error
Runtime error
Commit
·
2258a01
1
Parent(s):
1daa3fe
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,7 +73,7 @@ def load_data():
|
|
| 73 |
reviews, total_reviews = get_latest_reviews(db)
|
| 74 |
db.close()
|
| 75 |
return reviews, total_reviews
|
| 76 |
-
def
|
| 77 |
from python_actr import log_everything
|
| 78 |
|
| 79 |
#code1="tim = MyAgent()"
|
|
@@ -88,7 +88,7 @@ def run_code():
|
|
| 88 |
env.model2=ProceduralPlayer()
|
| 89 |
env.model2.choice=env.choice2
|
| 90 |
response=env.run()
|
| 91 |
-
|
| 92 |
|
| 93 |
css="footer {visibility: hidden}"
|
| 94 |
|
|
@@ -105,15 +105,15 @@ with gr.Blocks(css=css) as demo:
|
|
| 105 |
rate = gr.Textbox(label="b") #, placeholder="What is your name?") #gr.Radio(label="How satisfied are you with using gradio?", choices=[1, 2, 3, 4, 5])
|
| 106 |
celsci = gr.Textbox(label="c") #, lines=10, placeholder="Do you have any feedback on gradio?")
|
| 107 |
submit = gr.Button(value=".")
|
| 108 |
-
submit2 = gr.Button(value="Run Code")
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
demo.load(load_data, None, [data, count])
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
|
| 118 |
def secwork(name):
|
| 119 |
#if name=="abc":
|
|
|
|
| 73 |
reviews, total_reviews = get_latest_reviews(db)
|
| 74 |
db.close()
|
| 75 |
return reviews, total_reviews
|
| 76 |
+
def run_actr():
|
| 77 |
from python_actr import log_everything
|
| 78 |
|
| 79 |
#code1="tim = MyAgent()"
|
|
|
|
| 88 |
env.model2=ProceduralPlayer()
|
| 89 |
env.model2.choice=env.choice2
|
| 90 |
response=env.run()
|
| 91 |
+
return response
|
| 92 |
|
| 93 |
css="footer {visibility: hidden}"
|
| 94 |
|
|
|
|
| 105 |
rate = gr.Textbox(label="b") #, placeholder="What is your name?") #gr.Radio(label="How satisfied are you with using gradio?", choices=[1, 2, 3, 4, 5])
|
| 106 |
celsci = gr.Textbox(label="c") #, lines=10, placeholder="Do you have any feedback on gradio?")
|
| 107 |
submit = gr.Button(value=".")
|
| 108 |
+
#submit2 = gr.Button(value="Run Code")
|
| 109 |
+
if (celsci="Celscis List"):
|
| 110 |
+
submit.click(ccogsphere, [name, rate, run_actr, [data, count])
|
| 111 |
+
else:
|
| 112 |
+
submit.click(ccogsphere, [name, rate, celsci], [data, count])
|
| 113 |
demo.load(load_data, None, [data, count])
|
| 114 |
+
#@name.change(inputs=name, outputs=celsci,_js="window.location.reload()")
|
| 115 |
+
#@rate.change(inputs=rate, outputs=name,_js="window.location.reload()")
|
| 116 |
+
#@celsci.change(inputs=celsci, outputs=rate,_js="window.location.reload()")
|
| 117 |
|
| 118 |
def secwork(name):
|
| 119 |
#if name=="abc":
|