Skip to content

Commit

Permalink
remove api intercept
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-sol committed Mar 5, 2024
1 parent 3e7bb9e commit a938093
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ emoji: 🧑🏻‍🏫
colorFrom: gray
colorTo: pink
sdk: gradio
sdk_version: 4.19.2
app_file: scripts/gradio-ui.py
pinned: false
---
Expand Down
15 changes: 8 additions & 7 deletions scripts/gradio-ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@

logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)

# This variables are used to intercept API calls
# launch mitmweb
cert_file = "/Users/omar/Downloads/mitmproxy-ca-cert.pem"
os.environ["REQUESTS_CA_BUNDLE"] = cert_file
os.environ["SSL_CERT_FILE"] = cert_file
os.environ["HTTPS_PROXY"] = "http://127.0.0.1:8080"
logging.getLogger("httpx").setLevel(logging.WARNING)

# # This variables are used to intercept API calls
# # launch mitmweb
# cert_file = "/Users/omar/Downloads/mitmproxy-ca-cert.pem"
# os.environ["REQUESTS_CA_BUNDLE"] = cert_file
# os.environ["SSL_CERT_FILE"] = cert_file
# os.environ["HTTPS_PROXY"] = "http://127.0.0.1:8080"

CONCURRENCY_COUNT = int(os.getenv("CONCURRENCY_COUNT", 64))
MONGODB_URI = os.getenv("MONGODB_URI")
Expand Down

0 comments on commit a938093

Please sign in to comment.