barandonmez35488 commited on
Commit
ef2d4bb
·
1 Parent(s): 586d37a

Add gradio app.py

Browse files
Files changed (2) hide show
  1. app.py +14 -0
  2. requirements.txt +1 -6
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import requests
3
+
4
+ def get_trends():
5
+ # Sade örnek — sonradan gerçek API bağlayabiliriz
6
+ return ["AI is changing everything!", "Python 3.13 released!", "Cybersecurity is 🔥"]
7
+
8
+ with gr.Blocks() as demo:
9
+ gr.Markdown("# 🤖 Social AI Bot")
10
+ btn = gr.Button("Fetch Latest Trends")
11
+ output = gr.Textbox(label="Trending Topics")
12
+ btn.click(fn=lambda: "\n".join(get_trends()), outputs=output)
13
+
14
+ demo.launch()
requirements.txt CHANGED
@@ -1,7 +1,2 @@
1
- fastapi
2
- uvicorn
3
  requests
4
- python-dotenv
5
- ruff
6
- pytest
7
- uv
 
1
+ gradio
 
2
  requests