Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Miquel Farré
commited on
Commit
·
c290381
1
Parent(s):
1575b5c
making screen bigger
Browse files
app.py
CHANGED
@@ -39,8 +39,8 @@ custom_css = """
|
|
39 |
|
40 |
.sandbox-container {
|
41 |
position: relative;
|
42 |
-
width:
|
43 |
-
height:
|
44 |
flex-shrink: 0;
|
45 |
overflow: hidden;
|
46 |
}
|
@@ -56,22 +56,22 @@ custom_css = """
|
|
56 |
|
57 |
.sandbox-iframe {
|
58 |
position: absolute;
|
59 |
-
top:
|
60 |
-
left:
|
61 |
width: 1288px;
|
62 |
height: 968px;
|
63 |
border: 4px solid #444444;
|
64 |
transform-origin: 0 0;
|
65 |
-
transform: scale(0.
|
66 |
}
|
67 |
|
68 |
/* Status indicator light */
|
69 |
.status-indicator {
|
70 |
position: absolute;
|
71 |
-
bottom:
|
72 |
-
left:
|
73 |
-
width:
|
74 |
-
height:
|
75 |
border-radius: 50%;
|
76 |
border: 2px solid black;
|
77 |
z-index: 100;
|
@@ -79,9 +79,9 @@ custom_css = """
|
|
79 |
|
80 |
.status-text {
|
81 |
position: absolute;
|
82 |
-
bottom:
|
83 |
-
left:
|
84 |
-
font-size:
|
85 |
font-weight: bold;
|
86 |
color: black;
|
87 |
background-color: white;
|
@@ -121,9 +121,10 @@ custom_css = """
|
|
121 |
|
122 |
|
123 |
html_template = """
|
|
|
124 |
<div class="sandbox-outer-wrapper">
|
125 |
<div class="sandbox-container">
|
126 |
-
<img src="https://huggingface.co/datasets/
|
127 |
<div class="status-text">{status_text}</div>
|
128 |
<div class="status-indicator {status_class}"></div>
|
129 |
<iframe id="sandbox-iframe"
|
@@ -135,7 +136,7 @@ html_template = """
|
|
135 |
<img id="bsod-image"
|
136 |
src="https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/blue_screen_of_death.gif"
|
137 |
class="bsod-image"
|
138 |
-
style="display: none; position: absolute; top:
|
139 |
/>
|
140 |
</div>
|
141 |
</div>
|
@@ -422,7 +423,7 @@ def run_agent_task(task_input, request: gr.Request):
|
|
422 |
|
423 |
# Create a Gradio app with Blocks
|
424 |
with gr.Blocks(css=custom_css, js=custom_js) as demo:
|
425 |
-
gr.HTML("""<h1 style="text-align: center">Personal Computer Assistant</h1>""")
|
426 |
|
427 |
# HTML output with simulated image and iframe - default to interactive
|
428 |
html_output = gr.HTML(
|
@@ -433,25 +434,25 @@ with gr.Blocks(css=custom_css, js=custom_js) as demo:
|
|
433 |
),
|
434 |
label="Output"
|
435 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
"
|
447 |
-
|
448 |
-
|
449 |
-
"Search a flight Paris - Berlin for tomorrow"
|
450 |
-
],
|
451 |
-
inputs = task_input,
|
452 |
-
label= "Example Tasks",
|
453 |
-
examples_per_page=4
|
454 |
-
)
|
455 |
|
456 |
|
457 |
# Results output
|
|
|
39 |
|
40 |
.sandbox-container {
|
41 |
position: relative;
|
42 |
+
width: 1024px;
|
43 |
+
height: 811px;
|
44 |
flex-shrink: 0;
|
45 |
overflow: hidden;
|
46 |
}
|
|
|
56 |
|
57 |
.sandbox-iframe {
|
58 |
position: absolute;
|
59 |
+
top: 7%;
|
60 |
+
left: 18%;
|
61 |
width: 1288px;
|
62 |
height: 968px;
|
63 |
border: 4px solid #444444;
|
64 |
transform-origin: 0 0;
|
65 |
+
transform: scale(0.51);
|
66 |
}
|
67 |
|
68 |
/* Status indicator light */
|
69 |
.status-indicator {
|
70 |
position: absolute;
|
71 |
+
bottom: 28.6%;
|
72 |
+
left: 20.1%;
|
73 |
+
width: 20px;
|
74 |
+
height: 20px;
|
75 |
border-radius: 50%;
|
76 |
border: 2px solid black;
|
77 |
z-index: 100;
|
|
|
79 |
|
80 |
.status-text {
|
81 |
position: absolute;
|
82 |
+
bottom: 28.4%;
|
83 |
+
left: 22.5%;
|
84 |
+
font-size: 16px;
|
85 |
font-weight: bold;
|
86 |
color: black;
|
87 |
background-color: white;
|
|
|
121 |
|
122 |
|
123 |
html_template = """
|
124 |
+
<h1 style="text-align: center">Personal Computer Assistant</h1>
|
125 |
<div class="sandbox-outer-wrapper">
|
126 |
<div class="sandbox-container">
|
127 |
+
<img src="https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/desktop2.png" class="sandbox-background" />
|
128 |
<div class="status-text">{status_text}</div>
|
129 |
<div class="status-indicator {status_class}"></div>
|
130 |
<iframe id="sandbox-iframe"
|
|
|
136 |
<img id="bsod-image"
|
137 |
src="https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/blue_screen_of_death.gif"
|
138 |
class="bsod-image"
|
139 |
+
style="display: none; position: absolute; top: 7%; left: 18%; width: 657px; height: 494px; border: 4px solid #444444;"
|
140 |
/>
|
141 |
</div>
|
142 |
</div>
|
|
|
423 |
|
424 |
# Create a Gradio app with Blocks
|
425 |
with gr.Blocks(css=custom_css, js=custom_js) as demo:
|
426 |
+
#gr.HTML("""<h1 style="text-align: center">Personal Computer Assistant</h1>""")
|
427 |
|
428 |
# HTML output with simulated image and iframe - default to interactive
|
429 |
html_output = gr.HTML(
|
|
|
434 |
),
|
435 |
label="Output"
|
436 |
)
|
437 |
+
with gr.Row():
|
438 |
+
# Text input for task
|
439 |
+
task_input = gr.Textbox(
|
440 |
+
value="Find picture of cute puppies",
|
441 |
+
label="Enter your command",
|
442 |
+
)
|
443 |
|
444 |
+
# Examples
|
445 |
+
gr.Examples(
|
446 |
+
examples=[
|
447 |
+
"Check the bike commute time between Boll and Bern",
|
448 |
+
"Open a text editor and write 'Hello World'",
|
449 |
+
"Check when is the next F1 race",
|
450 |
+
"Search a flight Paris - Berlin for tomorrow"
|
451 |
+
],
|
452 |
+
inputs = task_input,
|
453 |
+
label= "Example Tasks",
|
454 |
+
examples_per_page=4
|
455 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
|
457 |
|
458 |
# Results output
|