Spaces:
Runtime error
Runtime error
Rename main3.py to t.py
Browse files
main3.py
DELETED
|
@@ -1,19 +0,0 @@
|
|
| 1 |
-
from fastapi import FastAPI
|
| 2 |
-
import os
|
| 3 |
-
|
| 4 |
-
app = FastAPI()
|
| 5 |
-
|
| 6 |
-
@app.get("/")
|
| 7 |
-
async def test_route():
|
| 8 |
-
# This is the line that prints to the console (Hugging Face Logs)
|
| 9 |
-
print("hi")
|
| 10 |
-
|
| 11 |
-
# This is the message the browser will receive
|
| 12 |
-
return {"message": "Check your Hugging Face Logs now!"}
|
| 13 |
-
|
| 14 |
-
@app.post("/webhook")
|
| 15 |
-
async def dummy_webhook():
|
| 16 |
-
# Keep this route here so Telegram doesn't complain during the test
|
| 17 |
-
print("Webhook hit, but ignored for test.")
|
| 18 |
-
return {"status": "ok"}
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
t.py
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
a = requests.get("https://www.google.com")
|
| 3 |
+
print(a.text)
|