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