Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
active_count = 0
|
| 4 |
+
|
| 5 |
+
def predict(input_data):
|
| 6 |
+
global active_count
|
| 7 |
+
active_count += 1
|
| 8 |
+
|
| 9 |
+
# dummy prediction
|
| 10 |
+
return f"Active Users (estimated): {active_count}"
|
| 11 |
+
|
| 12 |
+
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
|
| 13 |
+
iface.launch()
|