Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,12 +2,15 @@ import os
|
|
| 2 |
from gradio_client import Client, handle_file
|
| 3 |
|
| 4 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
client = Client("rootglitch/CarVizGradioDemo01")
|
| 8 |
result = client.predict(
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
)
|
| 13 |
print(result)
|
|
|
|
| 2 |
from gradio_client import Client, handle_file
|
| 3 |
|
| 4 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 5 |
+
# Create a client with authentication
|
| 6 |
+
client = Client(
|
| 7 |
+
"rootglitch/CarVizGradioDemo01",
|
| 8 |
+
hf_token=HF_TOKEN
|
| 9 |
+
)
|
| 10 |
|
|
|
|
| 11 |
result = client.predict(
|
| 12 |
+
input_image_path=handle_file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
|
| 13 |
+
prompt="Hello!!",
|
| 14 |
+
api_name="/generate_image"
|
| 15 |
)
|
| 16 |
print(result)
|