Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,20 +1,9 @@
|
|
| 1 |
-
import os
|
| 2 |
import gradio as gr
|
| 3 |
-
from google import genai
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
prompt = f"Analyze stock {ticker}"
|
| 13 |
-
response = client.models.generate_content(
|
| 14 |
-
model="gemini-2.5-flash-preview-05-20",
|
| 15 |
-
contents=prompt
|
| 16 |
-
)
|
| 17 |
-
return response.text
|
| 18 |
-
|
| 19 |
-
iface = gr.Interface(fn=analyze_stock, inputs="text", outputs="text")
|
| 20 |
-
iface.launch()
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
+
with gr.Blocks() as demo:
|
| 4 |
+
gr.Markdown("<span style='background-color:red; color:blue; font-weight:bold; padding:5px; border-radius:4px;'>My Label</span>")
|
| 5 |
+
with gr.Row():
|
| 6 |
+
txt1 = gr.Textbox(label="Input 1")
|
| 7 |
+
txt2 = gr.Textbox(label="Input 2")
|
| 8 |
|
| 9 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|